title: How to set header in Android Json
body: <p>I want to fetch data from the Web service HttpGet Method. Web Service needs two header information. </p>
  
  <p>How can i add set Parameters ?</p>
  
  <pre><code>"Content-Type", "application/json"
  "Authorization", "Bearer " + Utils.PreferencesGetir(ActivityPuanlarim.this, "Preferences_Token"))
  </code></pre>
  
  <p><strong>Json Data</strong></p>
  
  <pre><code>[  
  {
  "ID": 12,
  "KayitTarihi": "2016-07-21T08:37:01.603",
  "KullanilanPuan": 0,
  "KuponID": 2,
  "KuponKullanim": [],
  "KuponNo": "S7240061",
  "KuponAciklama": "Açıklama 1",
  "Puan": 40
  },
  {
  "ID": 13,
  "KayitTarihi": "2016-07-21T09:38:48.877",
  "KullanilanPuan": 0,
  "KuponID": 2,
  "KuponKullanim": [],
  "KuponNo": "S7240071",
  "KuponAciklama": "Açıklama 2",
  "Puan": 40 
   }
  ]
  </code></pre>
  
  <p><strong>AsyncTask doInBackground</strong></p>
  
  <pre><code> @Override
      protected Void doInBackground(Void... voids) {
  
          List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
  
          params.add(new BasicNameValuePair("Content-Type", "application/json"));
          params.add(new BasicNameValuePair("Authorization", "Bearer " + Utils.PreferencesGetir(ActivityPuanlarim.this, "Preferences_Token")));
  
  
          JSONArray json = jParser.makeHttpRequestArray(URL, "GET", params);
  
          try {
  
              if (Utils.InternetKontrol(ActivityPuanlarim.this) == true) {
                  for (int i = 0; i &lt; json.length(); i++) {
                      JSONObject c = json.getJSONObject(i);
  
  
                      String id = c.getString("ID");
                      String kayitTarihi = c.getString("KayitTarihi");
                      String kullanilanPuan = c.getString("KullanilanPuan");
                      String kuponID = c.getString("KuponID");
                      String kuponKullanim = c.getString("KuponKullanim");
                      String kuponNo = c.getString("KuponNo");
                      String kuponAciklama = c.getString("KuponAciklama");
                      String puan = c.getString("Puan");
  
  
                      // Hashmap oluşturulur
                      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
  
                      map.put("ID", id);
                      map.put("KayitTarihi", kayitTarihi);
                      map.put("KullanilanPuan", kullanilanPuan);
                      map.put("KuponID", kuponID);
                      map.put("KuponKullanim", kuponKullanim);
                      map.put("KuponNo", kuponNo);
                      map.put("KuponAciklama", kuponAciklama);
                      map.put("Puan", puan);
  
                      puanlarimTumKayitlarList.add(map);
                  }
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
          return null;
      }
  </code></pre>