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

Option to use HTTP GET requests instead of POST #13

Merged
merged 2 commits into from
Dec 18, 2015

Conversation

metaodi
Copy link
Contributor

@metaodi metaodi commented Dec 14, 2015

This changed adds a new option to the Client contructor called
http_get, which is a boolean defaulting to False.

If this option is set to True, the Client would construct a URL for a
HTTP GET request instead of the otherwise used POST request (determined
if a caller provides the data parameter or not). According to the
OAI-PMH standard both methods are allowed. But I came across yet
another faulty implementation, where POST would not work, only GET does.
This flag is a workaround that might come in handy for others as well.

This changed adds a new option to the Client contructor called
`http_get`, which is a boolean defaulting to False.

If this option is set to True, the Client would contruct a URL for a
HTTP GET request instead of the otherwise used POST request (determined
if a caller provides the `data` parameter or not). According to the
OAI-PMH standard both methods are allowed. But I came a long yet
another fauly implementation, where POST would not work, only GET does.
This flag is a workaround that might come in handy for others as well.
@metaodi
Copy link
Contributor Author

metaodi commented Dec 14, 2015

If you are okay with this PR, it probably needs a little bit of documentation, don't know where I should add such things.

@metaodi metaodi mentioned this pull request Dec 15, 2015
@metaodi
Copy link
Contributor Author

metaodi commented Dec 15, 2015

Fixes #11

@metaodi
Copy link
Contributor Author

metaodi commented Dec 17, 2015

@jascoul thanks for your feedback. I changed the name of the param.

jascoul added a commit that referenced this pull request Dec 18, 2015
Option to use HTTP GET requests instead of POST
@jascoul jascoul merged commit 8ba5c53 into infrae:master Dec 18, 2015
@metaodi
Copy link
Contributor Author

metaodi commented Dec 22, 2015

@jascoul Do you consider to create a new release on PyPI soonish? It would be great to get the latest changes as a regular release that I can use as a dependency in my projects. It's been already more than 5 years since the last release... If you need help maintaining the codebase, I'm happy to help.

@jascoul
Copy link
Collaborator

jascoul commented Dec 23, 2015

@metaodi Yes, it's been a while, I agree. I've just made a new release on PyPI with your changes.

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

Successfully merging this pull request may close these issues.

2 participants