Skip to content

Commit

Permalink
Use NewReader instead of NewBuffer (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
moredure authored Mar 29, 2022
1 parent dd805c2 commit bf64dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (c *Client) PushWithContext(ctx Context, n *Notification) (*Response, error
}

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

0 comments on commit bf64dd4

Please sign in to comment.