Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Custom headers #41

Open
zaalbarxx opened this issue Apr 27, 2016 · 2 comments
Open

Custom headers #41

zaalbarxx opened this issue Apr 27, 2016 · 2 comments

Comments

@zaalbarxx
Copy link

Hi!
It would be great if there would be a chance to apply custom headers for given request. For example Firefox requires TTL header to be set when pushing to their push service so every request to them receives 400 status code if device is not currently connected to the internet. I think there may be some other cases where setting some custom headers could be potentially required.

@RyanEwen
Copy link

It looks like GCM suddenly requires this, too. I can't send any messages as of a day or two ago.

@wibblymat
Copy link
Contributor

@zaalbarxx @RyanEwen in the case of TTL specifically, yes this was recently added to the spec and the push providers implemented it a lot quicker than I expected! I have snuck in a default TTL (of 0) into PR #17

For custom headers I'm not 100% sure what the best strategy is. In the Go version of the library you have the option of getting the HTTP Request object, so that you can change any headers - or anything else - you want to on it before sending it. Perhaps we could do something like that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants