Skip to content

Commit

Permalink
BaseSession._set_curl_options(): fix method setopt
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Apr 1, 2024
1 parent 0847c44 commit 3c23431
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion curl_cffi/requests/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ def _set_curl_options(
c = curl

# method
c.setopt(CurlOpt.CUSTOMREQUEST, method.encode())
if method == "POST":
c.setopt(CurlOpt.POST, 1)
elif method != "GET":
c.setopt(CurlOpt.CUSTOMREQUEST, method.encode())

# url
if self.params:
Expand Down

0 comments on commit 3c23431

Please sign in to comment.