Skip to content

Commit

Permalink
[v1.1.5] unset body when required
Browse files Browse the repository at this point in the history
  • Loading branch information
zepgram committed May 6, 2024
1 parent cf972c5 commit fe3413c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Service/ApiProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ private function formatOptions(array $body, array $headers, bool $verify, string
$contentType = $headers['Content-Type'] ?? null;
if ($contentType === 'application/x-www-form-urlencoded') {
$options['form_params'] = $body;
unset($options['body'], $options['query']);
}
$options['headers'] = $headers;
$options['verify'] = $verify;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zepgram/module-rest",
"description": "Technical module to industrialize API REST call with dependency injection pattern using Guzzle library",
"type": "magento2-module",
"version": "1.1.4",
"version": "1.1.5",
"authors": [
{
"name": "Benjamin Calef",
Expand Down

0 comments on commit fe3413c

Please sign in to comment.