apollo-link-rest
apollo-link-rest copied to clipboard
Support for server response code 307
I try to do a query which returns a temporary download link with status code 307, I can get a response from the network but Right now the everything that has a response code of >= 300 is handled as an error in the restLink.ts file...
Error :
Error: Network error: Response not successful: Received status code 307
Is there any workaround for this issue or can it be solved?
Thanks!
I’m no expert at HTTP, I’d be happy for a feature thange that has more nuance there or makes an exception for 307 and other codes?
Awesome! I think you can make an exception for all the 3xx status codes. Because this always indicates a redirect of some sort which the client should handle or a location header would be present on the request...
@nickverstocken -- 302 and some other 3xx-class codes are automatically (transparently) handled in many cases. You have to opt out to avoid 302 redirects. I guess I'm wondering why 307 isn't transparently handled in this case?
Happy for a PR change that documents how we're supposed to handle that class of status codes!