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

POST should not be used when querying the server #51

Closed
nedosa opened this issue Nov 20, 2014 · 6 comments
Closed

POST should not be used when querying the server #51

nedosa opened this issue Nov 20, 2014 · 6 comments
Assignees
Milestone

Comments

@nedosa
Copy link

nedosa commented Nov 20, 2014

I think the decision to use POST to submit page and search parameters to the server is not only incompatible with REST (see here for a discussion http://restcookbook.com/HTTP%20Methods/put-vs-post/), it also makes it awkward to design a decent REST service and worst of all it breaks caching.

I would like for example my bootgrid to query my service at /stuff/ and when I want to add to stuff I can just POST to /stuff/. Right now, even though this is feasible, I need to differentiate based on the POST body, which is far from ideal.

Is there a chance to revert the decision and use GET at all times when bootgrid reads data ?

@hhermsen
Copy link

+1 Changed this in my production version as well. Am willing to apply my patch.

@rstaib
Copy link
Owner

rstaib commented Dec 4, 2014

Yes I know and it is already on my list. Thanks for reporting it.

@rstaib rstaib self-assigned this Dec 4, 2014
@rstaib rstaib added this to the 1.2.0 milestone Apr 9, 2015
@rstaib
Copy link
Owner

rstaib commented Apr 9, 2015

Fixed in version 1.2.0 which will be publicly available within the next few days.

@rstaib rstaib closed this as completed Apr 9, 2015
@rstaib
Copy link
Owner

rstaib commented Apr 17, 2015

I have recently published the release candidate (prerelease version including all features) to NPM and NuGet. Would be nice and very appreciated to get your feedback before publishing it.

@christoff-botes
Copy link

Hi. I have version 1.2.0 installed but my AJAX requests are still submitting as POST even if I specify GET. The request ends with HTTP error code 405. See attached screenshot of F12 in IE and my code below.

< -----script>
$("#tbGroups1").bootgrid({
caseSensitive: false,
ajax: true,
ajaxSettings: { method: "GET" },
url: "../api/groups"
// post: function () {
/* To accumulate custom parameter with the request object */
// return {
// id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
// };
// }
})
<----/script>

image

@rstaib
Copy link
Owner

rstaib commented May 19, 2015

I have tested it right now and it works perfect. Propably you still use an old version of bootgrid (perhaps it is cached by your browser). For further discussion please provide a jsfiddle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants