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

Dynamic configuration of http headers #289

Closed
wants to merge 3 commits into from
Closed

Dynamic configuration of http headers #289

wants to merge 3 commits into from

Conversation

viniciussoares
Copy link

@viniciussoares viniciussoares commented Jun 18, 2018

Allow http headers to be reconfigured through HTTPNetworkTransport.

This will probably resolve the following issues:

#37
#140
#131 (Never been merged)


/enhancement

  • feature
  • blocking
  • docs

@ghost ghost added the feature New addition or enhancement to existing solutions label Jun 18, 2018
@apollo-cla
Copy link

@viniciussoares: 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/

@ghost ghost added the feature New addition or enhancement to existing solutions label Jun 18, 2018
@amol-c
Copy link

amol-c commented Jun 20, 2018

Can we get this PR merged as a temporary fix even if there are plan for longer term fix?

@viniciussoares
Copy link
Author

@amol-c as a temporary workaround update your Podfile to use my repository.

pod 'Apollo',        git: 'https://github.com/viniciussoares/apollo-ios', branch: 'master'
pod 'Apollo/SQLite', git: 'https://github.com/viniciussoares/apollo-ios', branch: 'master'



httpHeaders?.forEach { header in
request.addValue(header.value, forHTTPHeaderField: header.key)

Choose a reason for hiding this comment

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

You have 2 extra spaces before request for consistent indentation

@brennantaylor
Copy link
Contributor

brennantaylor commented Jun 26, 2018

Could we instead get a delegate? This would make per-request headers much easier (ie per request signing) and make it more extensible to other changes or instrumentation for any part of the http request before it is fired off.

@martijnwalraven
Copy link
Contributor

I agree with @brennantaylor that adding a property for headers won't be flexible enough to support the use cases that have come up. I added some more detail about this in #297 (comment).

@viniciussoares
Copy link
Author

I agree :) Closed in favor of #297

@brennantaylor
Copy link
Contributor

@viniciussoares Thanks, your PR inspired me to get off my butt and open one of my own :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants