Skip to content

Commit

Permalink
signalmeow/web: fix unnecessary NewBuffer use
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 9, 2024
1 parent ffd1ba3 commit 58416d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/signalmeow/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func SendHTTPRequest(ctx context.Context, method string, path string, opt *HTTPR
Logger()
ctx = log.WithContext(ctx)

req, err := http.NewRequestWithContext(ctx, method, urlStr, bytes.NewBuffer(opt.Body))
req, err := http.NewRequestWithContext(ctx, method, urlStr, bytes.NewReader(opt.Body))
if err != nil {
log.Err(err).Msg("Error creating request")
return nil, err
Expand Down

0 comments on commit 58416d1

Please sign in to comment.