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

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

Open
sckott opened this issue Apr 3, 2019 · 3 comments
Open

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

sckott opened this issue Apr 3, 2019 · 3 comments
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Apr 3, 2019

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 sckott added this to the v0.5 milestone Nov 13, 2019
sckott added a commit that referenced this issue Nov 13, 2019
to allow toggling http method, get or post
added assert() method for general package use
added check_http_method() helper fxn for checking user input http_method values
@sckott sckott modified the milestones: v0.5, v0.6 Jul 28, 2020
@hannaboe
Copy link
Contributor

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.

@sckott
Copy link
Contributor Author

sckott commented Nov 18, 2020

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

@hannaboe
Copy link
Contributor

hannaboe commented Nov 18, 2020

Yes, I can try to do that.

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