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

Use HTTP request format arg to determine response type #532

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

jasonpaulos
Copy link
Contributor

Revert the behavior change in #477 which caused our HTTP client to determine the type (i.e. JSON or not) of a response based on the response headers. In theory this is an ok thing to do, but some edge cases have been reported where the response headers have been incorrect or not present -- in any case, they are not the most reliable.

This PR reverts HTTP response handing to our old behavior, which is to use the format query param to determine the response format for GET requests. POST and DELETE requests assume the response is always JSON (we don't have any endpoints that go against this assumption).

Closes #526

@jasonpaulos
Copy link
Contributor Author

I rebased this PR on top of #535 to get tests to pass

@jasonpaulos jasonpaulos marked this pull request as ready for review March 4, 2022 22:41
Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasonpaulos jasonpaulos merged commit 486ba93 into develop Mar 7, 2022
@jasonpaulos jasonpaulos deleted the fix-http-client branch March 7, 2022 19:47
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.

HTTPClient uses responses headers to determine format
2 participants