-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support empty POST
requests
#16
Comments
If that's needed, sure, why not. :) |
It's not that important. I have a use-case for sending a
looks cleaner than
If allowing empty |
Well, it's mostly a matter of deleting one line of code, an assertion that signals an error if the body is not specified, and then specifying a default empty string for the body. So it's not a big deal on the code side. My concern is about making the API clear for the user. I added the assertion because it seems like it would generally be an oversight if the user made a POST or PUT request without a body, and signaling the error before sending the request seems more helpful than making the request and having the user potentially be confused by the response from the server. I don't have strong feelings about this either way. I suppose I'd default to the status quo and letting the user give the empty string argument. What do you think? Thanks. |
I also have use-cases for using methods like (plz 'post url
:as 'response)
Well, you can turn this argument either way. |
@Dima-369 Ok, that's good enough for me to make this change. Thanks for your feedback. |
Thank you! |
Would you support sending
POST
requests with no body?The text was updated successfully, but these errors were encountered: