I'm using Akka Http Client 2.4.3 to invoke an API. I suspect the 
combination of 'Connection: close' and 'Transfer-Encoding: chunked' causing 
the databytes never materialized.

The raw response from the API as captured from curl is:

HTTP/1.1 200 OK

Date: Tue, 12 Apr 2016 18:13:13 GMT

Server: Apache

Set-Cookie: <Some Cookie>; Path=/; HttpOnly

Set-Cookie: <Some Cookie>; Expires=Fri, 10-Apr-2026 18:13:13 GMT; Path=/

Pragma: no-cache

Expires: Thu, 01 Jan 1970 00:00:00 GMT

Cache-Control: no-cache, no-store, must-revalidate, private

Vary: Accept-Encoding

Connection: close

Transfer-Encoding: chunked

Content-Type: application/json;charset=UTF-8


58

{"response":{"status":"success","value":"4o093l-0qhND.....7W35fsfnX8wjpnUjPWI3zx8BDc."}}

0



I did get the response. But, unmarshalling the entity never returns. My 
code to retrieve the the response entity is:


akkaHttp.singleRequest(req).flatMap { lithiumResponse =>

  logger.debug(s"Response: status = ${lithiumResponse.status}")

  Unmarshal(lithiumResponse.entity).to[JsValue] map { entity =>
    logger.info(s"response entity (JSON) = $entity")
    entity.extract[String]('response / 'value)
  }

}


It never gets to the log statement.  Thanks for the help or pointer.


kc


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to