title: cant get api from local web server
body: <p>i want to get data from my api web server. I tested on Postman the data is there, even when I try it on my browser the data is still there. but when i want to use the api in my flutter app why is the api empty.</p>
  <p>postman tested <a href="https://i.stack.imgur.com/4KfdO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4KfdO.png" alt="enter image description here" /></a></p>
  <p>my code to get api.</p>
  <pre><code>class DioClient {
    final Dio _dio = Dio(
      BaseOptions(
        baseUrl: 'https://spotify.test/api',
        contentType: &quot;application/json&quot;,
        responseType: ResponseType.json,
      )
    );
  
    Future&lt;HeaderList&gt; getDatas() async {
      Response datas = await _dio.get('/load/songs');
      print('data = ${datas.data}');
      return HeaderList.fromJson(datas.data);
    }
  }
  </code></pre>
  <p>my model</p>
  <pre><code>class HeaderList {
    final int total;
    final List&lt;Artist&gt; artist;
    final List&lt;Song&gt; songs;
  
    HeaderList({
      required this.total,
      required this.songs,
      required this.artist,
    });
  
    factory HeaderList.fromJson(Map&lt;String, dynamic&gt; json) =&gt; HeaderList(
      total: json['total data'],
      artist: List&lt;Artist&gt;.from(json['artist'].map((element) =&gt; Artist.fromJson(element))),
      songs: List&lt;Song&gt;.from(json['songs'].map((element) =&gt; Song.fromJson(element))),
    );
  }
  </code></pre>
  <p>is there any error in my code or my laravel web project ?. because I'm still a beginner in laravel ?</p>