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

Cannot explicitly set POST headers and body #1

Open
ghost opened this issue Jun 12, 2012 · 0 comments
Open

Cannot explicitly set POST headers and body #1

ghost opened this issue Jun 12, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 12, 2012

Hi,

Basically I would like to set the body with the XML I constructed and set the content type to "application/xml". However, with the existing API, I just could not figure out how to explicitly set the headers and body for POST message.

resp = myendpoint.update().post(payload=":",
headers={"Content-Type":"text/xml"})

which always converted my request into a html form submission.

Finally I have to resort to a quick hack to make it work.

https://github.com/hsun/apibee/commit/7bc5310b94f0cb817f97efccf2201c85b3b5b1dc

Maybe there is a more elegant way to do it?

-thanks

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

0 participants