title: OkHTTP AndroidBaseAdapter to ListView from data
body: <p>I've set up okhttp to download data from my server and display it in normal text view.
  But I would love to get it to ListView.</p>
  
  <p>I know I need to have base adapter, some item layout and I need help with how to get it working with OKHTTP.</p>
  
  <p>This is code that I use to download it, if you need anything else, please comment.</p>
  
  <pre><code>public class TaskAktualnosci extends AsyncTask&lt;String, Void, String&gt; {
  
      protected String doInBackground(String... params) {
          try {
              //*OKHTTP ponoć parametry dodaje do buildera*
         //     RequestBody parametry = new FormBody.Builder()
          //            .add("offset", "0")
           //           .add("limit", "50")
            //          .build();
  
              OkHttpClient klient = new OkHttpClient();
               final Gson gson = new Gson();
  
  
             Request request = new Request.Builder()
                      .url("http://www.apirest.poligon.webimpuls.pl/v1/restapi/aktualnosci?offset=0?limit=50")
                     // .post(parametry)
                     .build();
  
  
  
              Response response = klient.newCall(request).execute();
              return response.body().string();
  
  
  
          }catch (Exception e){
  
  
  
              return null;
          }
  
  
  
      }
  
  
      @Override
      protected  void onPostExecute(String s){
          super.onPostExecute(s);
  
          TextView textView = (TextView) findViewById(R.id.ciastko);
          textView.setText(s);
      }
  
  
  }
  
  }
  </code></pre>
  
  <p>I'm kinda new to android as whole and using Android Studio.</p>
  
  <p>Can anyone explain it to me in normal way or show code snippet?</p>