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

cannot add query parameters to put request #30

Open
svrolanski opened this issue May 4, 2018 · 5 comments
Open

cannot add query parameters to put request #30

svrolanski opened this issue May 4, 2018 · 5 comments

Comments

@svrolanski
Copy link

When you use put(), calls to param() are ignored.

@arbor95
Copy link

arbor95 commented Aug 29, 2018

you can use
uri += "?" + WebbUtils.queryString(request.params)

@svrolanski
Copy link
Author

yes, that is a valid wordaround for it, I think that was what I used, but it is will a bug isn't?

@arbor95
Copy link

arbor95 commented Aug 30, 2018

I think you can have a body for put() (same as for post()), where the params go automatically (but I don't know if that is true. For get() you surely have no request body, so params go auto to the queryString of url.).

@hgoebl
Copy link
Owner

hgoebl commented Sep 7, 2018

I'm not sure. Having query-params in URL of POST or PUT request can be useful, but AFAIK there are backend stacks which don't support it. At least for application/x-www-form-urlencoded it can be ambiguous.

Does anybody know facts about this?

@svrolanski
Copy link
Author

After some quick reading, it does not seem to break any RFC and I agree with what one said: "The difference between /user/john and /?user=john is merely a semantic one".

https://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not

https://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request/26717908#26717908

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

No branches or pull requests

3 participants