Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow method rewriting on redirects #913

Merged
merged 7 commits into from Nov 5, 2019

Conversation

szmarczak
Copy link
Collaborator

@szmarczak szmarczak commented Nov 2, 2019

Fixes #568
Fixes #885

@@ -20,13 +20,8 @@ import urlToOptions from './utils/url-to-options';
import {RequestFunction, NormalizedOptions, Response, ResponseObject, AgentByProtocol} from './utils/types';
import dynamicRequire from './utils/dynamic-require';

export type GetMethodRedirectCodes = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

305 has been deprecated

@sindresorhus
Copy link
Owner

I think this new capability be documented somewhere.

@szmarczak

This comment has been minimized.

@szmarczak
Copy link
Collaborator Author

okay you may merge now 👌

@szmarczak

This comment has been minimized.

@szmarczak szmarczak merged commit b7ead5f into sindresorhus:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

options.body is not cleaned up when using the json option POST request does not follow 301/ 302 redirects
2 participants