Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Allow intercepting redirection responses #29

Open
deontologician opened this issue Feb 21, 2015 · 1 comment
Open

Allow intercepting redirection responses #29

deontologician opened this issue Feb 21, 2015 · 1 comment

Comments

@deontologician
Copy link
Owner

Currently, redirection is automatic. It's sometimes useful to be able to examine the intermediate response.

Per the conversation in #26, I think it should be solved like this:

  1. Create a new subclass of OrphanHALNavigator for redirections. It will have one additional method redirect that returns the fully functional HALNavigator that is usually produced by the redirection (except that it will also fetch the resource to avoid turning this into a 3 step process)
  2. Add a flag keyword arg to POST/PUT/PATCH/DELETE operations similar to the request library's allow_redirects flag. Instead of performing the redirect automatically, it will produce one of these RedirectionOrphans
@deontologician
Copy link
Owner Author

Moving this out of the 1.0 release since it's backwards compatible. I have a start of this on josh/29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant