title: How to make synchronous call using Retrofit
body: <p>I'm trying to get data using Retrofit call.enqueue ( DrawCircles() ), when i debug the values are there, but i think it does not waits and my function proceeds with the rest of lines of code. So the problem when I run it, the List of results (myListCoord ) is always null, how to make synchronous calls.</p>
  
  <p>here is my code:</p>
  
  <pre><code> doAsync {
          var a = DrawCircles()
          myListCoord = a.runCircles()
      }
  fun runCircles(): List&lt;Coordinates&gt;? {
      val request = ServiceBuilder.buildService(TmdbEndpoints::class.java)
      val call = request.getCorrdinates()
  
      call.enqueue(object : Callback&lt;MyList&gt; {
          override fun onResponse(call: Call&lt;MyList&gt;, response: Response&lt;MyList&gt;) {
              if (response.isSuccessful){
                  Toast.makeText(this@DrawCircles, "Succès", Toast.LENGTH_LONG).show()
  
                  myListCoord = response.body()!!.locations
              }
          }
          override fun onFailure(call: Call&lt;MyList&gt;, t: Throwable) {
  
              Toast.makeText(this@DrawCircles, "${t.message}", Toast.LENGTH_SHORT).show()
          }
  
      })
      return myListCoord
  }
  </code></pre>