I'm using http client to call a service which is returning me an 
HttpEntity.CloseDelimited

HttpEntity.CloseDelimitedA streaming entity of unspecified length that is 
delimited by closing the connection ("Connection: close"). Note, that this 
entity type can only be used in an HttpResponse.I'm confused about the 
"Connection: close" bit. Where do I close the connection and how?

my client code looks like this

def getDoc(path: String): Future[HttpResponse] = {
  val authorization = headers.Authorization(BasicHttpCredentials(user, 
password))
  val request = HttpRequest(
    GET,
    uri = root + path,
    headers = List(authorization),
    protocol = `HTTP/1.0`
  )
  val conn = Http().outgoingConnection(host, port)
  val response = Source.single(request).via(conn.flow).runWith(Sink.head)
  response
}


called from this test code

val builder = UriBuilder("exist")
val f = builder.getDoc("apps/demo/data/macbeth.xml")
val waited = Await.result(f, 20 seconds)



-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to