MCPcopy
hub / github.com/sideshow/apns2 / setTokenHeader

Method setTokenHeader

client.go:211–214  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

209}
210
211func (c *Client) setTokenHeader(r *http.Request) {
212 bearer := c.Token.GenerateIfExpired()
213 r.Header.Set("authorization", "bearer "+bearer)
214}
215
216func setHeaders(r *http.Request, n *Notification) {
217 r.Header.Set("Content-Type", "application/json; charset=utf-8")

Callers 1

PushWithContextMethod · 0.95

Calls 1

GenerateIfExpiredMethod · 0.80

Tested by

no test coverage detected