Skip to content

Commit

Permalink
Merge d1668c3 into d5157a5
Browse files Browse the repository at this point in the history
  • Loading branch information
pshopper committed May 16, 2019
2 parents d5157a5 + d1668c3 commit ae0c310
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ func (c *Client) PushWithContext(ctx Context, n *Notification) (*Response, error
}

url := fmt.Sprintf("%v/3/device/%v", c.Host, n.DeviceToken)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload))
if err != nil {
return nil, err
}

if c.Token != nil {
c.setTokenHeader(req)
Expand Down

0 comments on commit ae0c310

Please sign in to comment.