title: OkHttp Client returns a null value
body: <p>I'm trying to use okhttpclient with okhttp3, but it return a null value.</p>
  
  <p>This is my code : </p>
  
  <pre><code>OkHttpClient client = new OkHttpClient();
  
  HttpUrl.Builder urlBuilder = HttpUrl.parse("http://www.test.com/get_data.php").newBuilder();
  urlBuilder.addEncodedQueryParameter("GroupName", groupName);
  String url = urlBuilder.build().toString();
  
  Request request = new Request.Builder()
      .url(url)
      .build();
  
  client.newCall(request).enqueue(new Callback() {
  
      @Override
      public void onFailure(Call call, IOException e) {
  
      }
  
      @Override
      public void onResponse(Call call, Response response) throws IOException {
          try {
              String responseData = response.body().string();
              JSONObject jsonObj = new JSONObject(responseData);
              jArray = jsonObj.getJSONArray("result");
          } catch (JSONException e) {
          }
      }
  });
  </code></pre>
  
  <p>then responseData returns {"result":[]} </p>
  
  <p>I try with the same url above but with different method with httpClient, it returns the value I want, here is the httpclient code :</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost("http://www.test.com/get_data.php");
  httppost.setEntity(new UrlEncodedFormEntity(data));
  HttpResponse response   = httpclient.execute(httppost);
  Log.i("postData", response.getStatusLine().toString());
  HttpEntity entity = response.getEntity();
  
  StringBuilder sb = new StringBuilder();
  String result = null;
  try {
      BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent()), 65728);
      String line = null;
      while ((line = reader.readLine()) != null) {
          sb.append(line);
      }
  
      if(sb.toString().trim().length() &gt; 0) {
          result = sb.toString();
          return result;
      }
  }
  </code></pre>
  
  <p>Please help me, someone who have experience with okhttp, why i need okhttp ?
  Because httpClient is already deprecated in sdk 23, thanks.</p>