Skip to content

Commit

Permalink
fix put
Browse files Browse the repository at this point in the history
  • Loading branch information
edsonalvesan committed Nov 11, 2020
1 parent e588ba7 commit ca76d93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/DigiSacClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function sendRequest(DigiSacRequest $request)
$timeOut = $request->getTimeOut();
$connectTimeOut = $request->getConnectTimeOut();

if ($method === 'POST') {
if (($method === 'POST') || ($method === 'PUT')) {
$options = $request->getPostParams();
} else {
$options = ['query' => $request->getParams()];
Expand Down
4 changes: 4 additions & 0 deletions src/DigiSacRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ public function getPostParams()
return $this->getParams();
}

if ($this->getMethod() === 'PUT') {
return $this->getParams();
}

return [];
}

Expand Down

0 comments on commit ca76d93

Please sign in to comment.