Skip to content

Commit 32a0ca0

Browse files
Merge pull request #2 from diogodourado/main
Fix for put method
2 parents 0e2cd6c + 5ec69c5 commit 32a0ca0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WhatsApp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private function request()
3131
curl_setopt($ch, CURLOPT_URL, $this->server . $this->parth);
3232
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
3333
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);
34-
if ($this->method === 'POST') {
34+
if ($this->method === 'POST' || $this->method === 'PUT') {
3535
curl_setopt($ch, CURLOPT_POST, true);
3636
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body);
3737
}

0 commit comments

Comments
 (0)