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 a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/iMVBr2bPkvg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.