Hi
I'm really lost and I can understand what going on.
I've written this to make aynch http call.
val req = HttpRequest(method = GET, uri = uri)
for ((k, v) <- headers) req ~> addHeader(k, v)
val pipeline = HttpConduit.sendReceive(conduit)
val responseQuery: Future[HttpResponse] = pipeline(req)
sender ! RequestResult("", "cxcxcxcxcx")
responseQuery onComplete {
case Success(response) => {
log.info("Success with status: " + response.status)
val content = response.entity.asString
sender ! RequestResult(uri, content)
}
case Failure(error) =>
sender ! RequestResult(uri, error.getMessage)
}
It's working I get content I can pring it even but
on the first sender ! RequestResult No problem I get response back on my dispatcher(sender)
but the second one after the responseQuery onComplete don't send nothing back.
Please some help. May be I wrong using Akka or it's related to how I'm using spray http
Thanks