-
Notifications
You must be signed in to change notification settings - Fork 118
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
Bravado tries to parse xml response as JSON #250
Comments
That definitely needs fixing: https://github.com/Yelp/bravado-core/blob/master/bravado_core/response.py#L102 |
I tried passing in .result(raw_response=True), but it still didn't work. Is raw_response not supported? |
swaggerpy (swagger 1.2) was refactored so much whilst adding Swagger 2.0 support (bravado/bravado-core) that it was effectively a rewrite. raw_response didn't make it in the final cut 😢 |
As a work around I clear the
After that you can look at the result text without json parsing:
Unfortunately, the library doesn't expose the |
One of my endpoints responds with xml data. I specify in the swagger spec that this endpoint produces: application/xml. Despite this, trying to call result() returns a JSONDecodeError.
If I configure 'also_return_response': True, it still tries to parse it as JSON :(
The text was updated successfully, but these errors were encountered: