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

Add the Accept application/json header if not provided #143

Merged
merged 1 commit into from
Sep 16, 2018

Conversation

marnusw
Copy link
Contributor

@marnusw marnusw commented Sep 1, 2018

Since a JSON body is assumed when handling successful responses it seems the Accept: application/json header should be set by default. The user can still override this header by providing a different value for it, but since parsing any other response format as JSON will fail in any case it doesn't seem like that will ever happen.

@ghost ghost added the feature Feature: new addition or enhancement to existing solutions label Sep 1, 2018
Copy link
Collaborator

@fbartho fbartho left a comment

Choose a reason for hiding this comment

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

Nice helper for friendlier first-time experiences.

@fbartho fbartho added this to the v0.5.0 milestone Sep 16, 2018
@fbartho fbartho merged commit 6107c4c into apollographql:master Sep 16, 2018
@marnusw marnusw deleted the acceptHeader branch September 17, 2018 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature: new addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants