httpx
httpx copied to clipboard
✨ obey retry after delay
Summary
Obey retry after as defined by the specifications
Checklist
- [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [ ] I've updated the documentation accordingly.
This issue was raised on Retry requests.
Proposition was to add a transport layer but it will not suffice, as if the redirection is done by the transport layer, then the history will be lost due to the behavior of Client._send_handling_redirects
Ah thanks for getting involved. We'd really need this to be started as a discussion first, tho it is helpful to see how you've resolved it.
Proposition was to add a transport layer but it will not suffice, as if the redirection is done by the transport layer, then the history will be lost due to the behavior of Client._send_handling_redirects
That's interesting... can we instead resolve that issue? Ie... if a transport returns a Response with a non-empty history, then the full history is retained, even when redirects occur?
(I'm going to close this off as a pull request, but very much open to this discussion progressing... I think you've probably identified a valid issue here let's talk it through)