title: Sending Header in Get Request
body: <p>I want to send a get request reguest in Flutter. But I keep getting HTML codes back.</p>
  <p>In Postman, I have to specify <code>accept: application/json</code> to be able to get the  JSON. But the tutorial I am following, it wasn't mentioned.</p>
  <p>Here is my code below</p>
  <pre><code>  void getData() async {
      http.Response response = await http.get(
          'https://libriboo.com/api/landing');
    //  var res = json.decode(response.body);
      print(response.body);
    }
  </code></pre>
  <p>I am getting this</p>
  <pre><code>I/flutter ( 5134):   &lt;head&gt;
  I/flutter ( 5134):     &lt;title&gt;Libri&lt;/title&gt;
  I/flutter ( 5134):     &lt;!-- Required meta tags --&gt;
  I/flutter ( 5134):     &lt;meta charset=&quot;utf-8&quot;&gt;
  I/flutter ( 5134):     &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;
  I/flutter ( 5134):     &lt;link rel=&quot;shortcut icon&quot; type=&quot;image/png&quot; href=&quot;.\images\favicon.png&quot;&gt;
  I/flutter ( 5134):     &lt;!-- Bootstrap CSS --&gt;
  I/flutter ( 5134):     &lt;link rel=&quot;stylesheet&quot; href=&quot;.\assets\css\style.css&quot;&gt;
  I/flutter ( 5134):     &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css&quot; integrity=&quot;sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T&quot; crossorigin=&quot;anonymous&quot;&gt;
  I/flutter ( 5134):     &lt;link href=&quot;https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css&quot; rel=&quot;stylesheet&quot; integrity=&quot;sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN&quot; crossorigin=&quot;anonymous&quot;&gt;
  I/flutter ( 5134):     &lt;link rel=&quot;stylesheet&quot; href=&quot;.\assets\css\bootstrap.css&quot;&gt;
  I/flutter ( 5134):     &lt;link rel=&quot;stylesheet&quot; href=&quot;.\assets\css\font-awesome.css&quot;&gt;
  I/flutter ( 5134):     &lt;script src=&quot;..\assets\js\script.js&quot;&gt;&lt;/script&gt;
  I/flutter ( 5134): 
  I/flutter ( 5134): 
  I/flutter ( 5134): 
  I/flutter ( 5134):   &lt;/head
  </code></pre>