title: getting String response from OKhttp
body: <p>I want to get string JSON response to the main activity after making the connection I know it is running in different thread so please help me how I can get it and then return it from this method;</p>
  
  <pre><code>public class MakeNetworkConnection {
  
      private String mBaseUrl;
      private String mApiKey;
      private String mContentType;
      private String mJsonResponce;
  
      public MakeNetworkConnection(String baseUrl, String apiKey, String contentType) {
          mBaseUrl = baseUrl;
          mApiKey = apiKey;
          mContentType = contentType;
      }
      public String startNetworkConnection() throws IOException {
  
          OkHttpClient client=new OkHttpClient();
          Request request=new Request.Builder().url("http://content.guardianapis.com/sections?api-key=1123456").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 {
                  if(response.isSuccessful()){
                      mJsonResponce=response.body().string();
                  }
              }
          });
  
         return mJsonResponce; 
      }
  }
  </code></pre>