title: How to show a progress during fetching JSON-data
body: <p>I would like to fetch some data from my web server. The data is a JSON object. I fetch the data with the fuel framework. I want to fill a recyclerview with the data. But I want to show a progress until the data is fetched.</p>
  
  <p>But I have no idea how to solve this with fuel.</p>
  
  <p>I have studied the fuel documentation. But I cannot find a solution</p>
  
  <p>The code fetches some JSON data</p>
  
  <pre><code>fun fetchMyThings(): List&lt;Thing&gt; {
      val username = "xxxx"
      val password = "xxxxxxxxx"
      val things = mutableListOf&lt;Thing&gt;()
      Fuel.get("https://www.thingurl.com/things")
              .authentication()
              .basic(username, password)
              .responseJson { request, response, result -&gt;
                  request.responseProgress()
                  val arr: JSONArray = result.get().array()
  
                  println(arr.length())
                  for (i in 0 until arr.length()) {
                      var elem: JSONObject = arr[i] as JSONObject
                      var obj: JSONObject = elem
                      var thing = Thing(UUID.fromString(obj.getString("uuid")))
                      thing.summary = obj.getString("summary")
                      things += thing
                      println(thing)
                  }
  
              }
      return things
  }
  </code></pre>
  
  <p>This code fills the recyclerview</p>
  
  <pre><code>private fun fillRecyclerView(things : List&lt;Thing&gt;) {
      val recyclerView = findViewById&lt;RecyclerView&gt;(R.id.main_recycler)
      val mainActivityRecyclerAdapter = MainActivityAdapter(this, things)
      recyclerView.adapter = mainActivityRecyclerAdapter
      recyclerView.layoutManager = LinearLayoutManager(this)
  }
  </code></pre>
  
  <p>Expectation: Progresshandling with Fuel</p>
  
  <p>Many thanks in advance for any help</p>
  
  <p>Next try...</p>
  
  <pre><code>fun getThings(): Single&lt;Result&lt;String, FuelError&gt;&gt; {
      val username = "********"
      val password = "********"
  
      val http = "https://www.nowhere.com/thing/"
              .httpGet()
              .authentication()
              .basic(username, password)
              .rxString(Charsets.UTF_8)
      return http
  }
  </code></pre>
  
  <pre><code>class MainActivity : AppCompatActivity() {
      var things: List&lt;Thing&gt; = emptyList()
      protected lateinit var adapter: MainActivityAdapter
  
  
      override fun onCreate(savedInstanceState: Bundle?) {
          //....
  
          fillRecyclerView(things)
  
      Server.getThings().subscribe { p -&gt;
          println(p)
          val arr: JSONArray = JSONArray(p.component1())
  
          for (i in 0 until arr.length()) {
              var elem: JSONObject = arr[i] as JSONObject
              var obj: JSONObject = elem
              var thing = Thing(UUID.fromString(obj.getString("uuid")))
              thing.summary = obj.getString("summary")
              things += thing
              println(thing)
          }
          adapter?.notifyDataSetChanged()
          findViewById&lt;ProgressBar&gt;(R.id.ac_main_progress).visibility = View.GONE
      }
  
          private fun fillRecyclerView(things : List&lt;Thing&gt;) {
                  val recyclerView = findViewById&lt;RecyclerView&gt;(R.id.main_recycler)
                  val mainActivityRecyclerAdapter = MainActivityAdapter(this, things)
                  adapter = mainActivityRecyclerAdapter
                  recyclerView.adapter = mainActivityRecyclerAdapter
                  recyclerView.layoutManager = LinearLayoutManager(this)
  
          }
  
      }
      ```
  </code></pre>