I have the following set-up:
val req = HttpRequest(HttpMethods.GET, Uri("http://www.example.com/blah"))
val response: Future[HttpResponse] = (IO(Http) ? req).mapTo[HttpResponse]
response.map(
resp => {
resp.headers.foreach(h => println(h))
}
)
and the following configuration: spray.can.host-connector.max-redirects = 2
. I know that this URL redirects, but when I examine response headers I don't see the Location header that tells me where it redirects to.
If I change the config to spray.can.host-connector.max-redirects = 1
Location header is there and correct. However, I'd like it not to break if someone in future decides they need more erdirects in the same app. Do I miss anything about spray configuration?