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

Modifying the headers before callling fetch #149

Open
ndpmurphy opened this issue Dec 8, 2017 · 1 comment
Open

Modifying the headers before callling fetch #149

ndpmurphy opened this issue Dec 8, 2017 · 1 comment

Comments

@ndpmurphy
Copy link

ndpmurphy commented Dec 8, 2017

I am using a proxy to redirect my traffic before going to api.segment.io. My proxy has some special header requirements, so I want to modify the headers before the fetch call.

I am considering making a local modification which allows a modifyHeaders function to be passed into the analytics-react-native module, and that function could be called after the headers have been constructed and before fetch is called.

Before I do that I was hoping someone could tell me if there is already a way of doing this, or if there is a better design

@neiker
Copy link
Owner

neiker commented Dec 20, 2017

Hi @ndpmurphy

Right now this is not implemented. If you want to made the changes and create a pull request, you can take a look here:
https://github.com/neiker/analytics-react-native/blob/master/src/index.js#L220

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

No branches or pull requests

2 participants