Are you trying to get all failed called, and block...
# kotlin-fuel
d
Are you trying to get all failed called, and block whilst a call is going on? Something like this is equivalent I think:
Copy code
val failedApiRequests = apiRequests.mapNotNull { 
  val (_, response) = <http://Fuel.post|Fuel.post>(Config.API_ENDPOINT).jsonBody(jackson.writeValueAsString(it)).responseString()
  if (response.isSuccessful) null else it.also { println(response.responseMessage) }
}