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

fix: case-insensitive 'Content-type' response header detection #315

Merged
merged 3 commits into from
Jan 30, 2022
Merged

fix: case-insensitive 'Content-type' response header detection #315

merged 3 commits into from
Jan 30, 2022

Conversation

vch-7
Copy link
Contributor

@vch-7 vch-7 commented Jan 28, 2022

Changed the Content-Type response header detection to be case-insensitive in the getResult function.

Fixes: #314

@vch-7 vch-7 changed the title Made the 'Content-type' response header detection case-insensitive fix: Made the 'Content-type' response header detection case-insensitive Jan 28, 2022
Copy link
Member

@jasonkuhrt jasonkuhrt left a comment

Choose a reason for hiding this comment

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

Thanks, test would be great.

@vch-7
Copy link
Contributor Author

vch-7 commented Jan 28, 2022

Thanks!

To add more context, the primary use case for this would be when the default fetch config in the GraphQLClient instance is overridden with say, an Axios wrapper, where the Response Header object does not implement a case-insensitive get method by default. I've added this to the issue description as well

Added a test for this use case

@jasonkuhrt jasonkuhrt changed the title fix: Made the 'Content-type' response header detection case-insensitive fix: case-insensitive 'Content-type' response header detection Jan 30, 2022
@jasonkuhrt jasonkuhrt merged commit cbfa1fb into graffle-js:master Jan 30, 2022
@vch-7 vch-7 deleted the fix-content-type-detection-to-be-case-insensitive branch February 7, 2022 18:25
@vch-7
Copy link
Contributor Author

vch-7 commented Feb 7, 2022

Thanks for the merge @jasonkuhrt! When do you plan the next release?

@jasonkuhrt
Copy link
Member

@vch-7 Not sure yet, still need to look into failing release tool stuff.

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.

Content-Type response header detection should not be case sensitive
2 participants