In an issue on the R CKAN client brought up at Use of POST-Requests instead of GET · Issue #67 · ropensci/ckanr · GitHub , there’s discussion of
POST`` requests. Some CKAN instances block all POST
requests, so they'd like as many methods to useGET` as possible.
Some of the CKAN API allows
GET (which we can allow in our R client for API methods that allow
GET), but many AFAIK require
POST. There is the trick of sending a
X-HTTP-Method-Override, but I’ve tried and that doesn’t seem to work, - it’s simply treated as a
POST request, and is blocked on instances that block
Any thoughts on this?
(sorry if this is the wrong place to post, let me know a better place)
As far as I am aware, the only ones that require POST requests are request that are changing content. Given the size of the content, and that it’s JSON I can’t imagine allowing POST requests to be replicated via a GET would work.
Are there specific calls where you can only send POST but would expect for GET requests to work just as well?
I seem to remember using all
POST requests because the http client we use
httr doesn’t allow body in
GET requests, and I thought at least some of the CKAN API methods wanted a body to be sent even in a
GET, but I could be remembering wrong. I’ll see about switching all methods that don’t change content to
Yes, I think this used to be the case, you’re not mis-remembering, but it should be a lot better with /api/3/action/*