go-fcm
go-fcm copied to clipboard
Allow callers to inject their own HTTP client.
This is necessary for AppEngine usage, where the standard HTTP client from net/http is not allowed.
good change. but this will make some changes in the api. so make a setclient func to set other client if needed, else the client will set to the default http
Happy to do so, but just to be clear, this is a new "constructor" function (NewFcmClientWithHttp vs NewFcmClient).
A SetClient func is also a reasonable approach. I dunno which is more Gothonic.
On Fri, Nov 17, 2017 at 4:38 PM Ahmad [Abo] Khet [email protected] wrote:
good change. but this will make some changes in the api. so make a setclient func to set other client if needed, else the client will set to the default http
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NaySoftware/go-fcm/pull/15#issuecomment-345277395, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1viwReJgO2S5OZ1mn_1OZvP1VnlfCUks5s3ahwgaJpZM4QdSUt .
I'll re-review the current commit and will discuss it :) Thank you very much
BTW, star the repo :)
No worries. I don't mind changing it, either, if you prefer an injector--just wanted to make sure you saw how it works now. Let me know your preference.
On Fri, Nov 17, 2017 at 7:34 PM Ahmad [Abo] Khet [email protected] wrote:
I'll re-review the current commit and will discuss it :) Thank you very much
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NaySoftware/go-fcm/pull/15#issuecomment-345325858, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1vi9OfysKBArylgs_YSgZ9TEWRHuvgks5s3dGngaJpZM4QdSUt .