Skip to content

Commit

Permalink
Implement synchronous request only for non get requests
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Feb 18, 2024
1 parent 50c939c commit 128bcbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.4 (unreleased)

- Implement synchronous request only for non-GET requests

## 0.1.3

- Optimize wait time after 429 response
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (client *Client) Do(req Req) (Res, error) {
}
}

if req.Synchronous {
if req.Synchronous && req.HttpReq.Method != "GET" && req.HttpReq.Method != "" {
return client.WaitTask(&req, &res)
}

Expand Down

0 comments on commit 128bcbb

Please sign in to comment.