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

Don't infer POST automatically when specifying body #756

Merged
merged 3 commits into from Mar 25, 2019

Conversation

szmarczak
Copy link
Collaborator

@szmarczak szmarczak commented Mar 15, 2019

Throws instead of defaulting the method to POST when specified body without method.

Checklist

  • I have included a pull request description of my changes.
  • I have included some tests.
  • If it's a new feature, I have included documentation updates.

@szmarczak szmarczak mentioned this pull request Mar 15, 2019
3 tasks
@sindresorhus
Copy link
Owner

There's some docs that are not updated: https://github.com/sindresorhus/got#json-mode

Try grepping for got( and find the places using json or body. There might be more places in the code and other docs.

@szmarczak
Copy link
Collaborator Author

Ah, forgot to update readme examples... Will do.

@sindresorhus sindresorhus changed the title Throw if providing body with GET/HEAD Don't infer POST automatically when specifying body Mar 25, 2019
@sindresorhus sindresorhus merged commit e367bdb into sindresorhus:master Mar 25, 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.

None yet

2 participants