firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.13k stars 244 forks source link

fix(fcm): Allow for override of batch endpoint URL #393

Closed jessejacksonanz closed 4 years ago

jessejacksonanz commented 4 years ago

This pull request addresses #385.

Of note, because there is only one HTTP client involved in sending both single messages and batch messages, the WithEndpoint() override will apply to both endpoints, even though the paths of the original endpoints differ. There's no easy way around this without refactoring of the code to use two different HTTP clients and in practice, somebody wanting to override this endpoint can likely cope with this limitation by dealing with the different requests based on the incoming content.