ckanr icon indicating copy to clipboard operation
ckanr copied to clipboard

Maybe allow user to select http method on a fxn level?

Open sckott opened this issue 5 years ago • 3 comments

via https://discuss.ropensci.org/t/ckranr-issue-when-accessing-data-gov-mk/1638

use case is some CKAN instances only support POST while others support only GET for some CKAN API methods

sckott avatar Apr 03 '19 18:04 sckott

Would it be possible to add the http_method parameter to functions like package_update and resource_create?

If I run these functions I get an error: Error: 400 - Bad Request "Bad request - JSON Error: Invalid request. Please use POST method for your request"

If I modify the function and set http_method = "POST" within as.ckan_package it works fine.

hannaboe avatar Nov 18 '20 11:11 hannaboe

Would you be comfortable sending a pull request with the change? if not i can do

sckott avatar Nov 18 '20 15:11 sckott

Yes, I can try to do that.

hannaboe avatar Nov 18 '20 17:11 hannaboe