r0man/cljs-http — pull request #8 by mkremins (2014-02-25 05:20:58+00:00)
Title: Add :trace-redirects key to response maps

Every response map now contains a :trace-redirects key pointing to a vector of URIs through which the request was redirected. Mirrors the clj-http behavior as closely as possible.

Since the underlying goog.net.XhrIo object doesn't seem to keep track of intermediary redirects (i.e. any but the very last URI it ends up hitting), intermediary URIs won't be present in the :trace-redirects vector as currently implemented. Thus, the vector will actually contain only the originally requested URL and the final URI from the XhrIo object. This is inconsistent with clj-http, but I'm hard-pressed to think of a way to include intermediary URLs without fiddling with XhrIo implementation details that seem to fall way outside the scope of this library.

Fixes #5.