Q:

How to make spray-can client follow redirects

When requesting some pages with the following code:
HttpDialog(httpClient, IDN.toASCII(domain)).send(HttpRequest(uri = "/")).end

spray-can client returns responses with redirects to another URLs (e.g. 302 Found). Is there a standard way of telling spray to automatically follow redirects? And if not, what is the best way to implement this behavior myself with akka futures?

A:

Update 2: The PR was merged and documentation for redirection following is spray-can can now be found here
Update: I decided to have a crack at implementing this and have sent a PR. Hopefully it will get merged.

There is no way to currently tell spray-can client to follow 3xx redirects. See this thread for more details.
There is an open ticket, so hopefully this will happen in the future. I'm sure a contribution would be welcomed.

