Skip to content

Add the ability to set custom http headers for HTTPNetworkTransport#131

Closed
gabrielar wants to merge 1 commit intoapollographql:masterfrom
gabrielar:feature/custom-headers-for-http-transport
Closed

Add the ability to set custom http headers for HTTPNetworkTransport#131
gabrielar wants to merge 1 commit intoapollographql:masterfrom
gabrielar:feature/custom-headers-for-http-transport

Conversation

@gabrielar
Copy link
Copy Markdown

Sometimes it is necessary to provide custom http headers, eg. to pass requests through a gateway. Thus this pull request adds functionality that does just that by adding an extra parameter to the HTTPNetworkTransport init method. This parameter is a block which is run for each request and must return a dictionary of type [String: String] which will be used to set up the HTTPRequest headers.

…ing initialisation; this block provides custom headers to the http request.
@apollo-cla
Copy link
Copy Markdown

@gabrielar: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@designatednerd
Copy link
Copy Markdown
Contributor

Hey @gabrielar - Thank you for doing this, and sorry for the long radio silence on our end!

Unfortunately since so much has changed since this PR was opened, I'm going to close this in favor of the work happening in #602 to implement this feature. Please feel free to chime in there if you have thoughts or questions, and open issues on anything you feel we may be leaving out.

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.

3 participants