Skip to content

Commit

Permalink
Merge pull request #62 from wedevBr/feature/AddBoundaryAtContentType
Browse files Browse the repository at this point in the history
[Feature] Added boundary at contentType
  • Loading branch information
adeildo-jr authored Mar 26, 2024
2 parents 1d2a28b + 4adb327 commit 3102564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Common/CelcoinBaseApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function post(string $endpoint, array $body = [], Attachable $attachment
foreach ($body as $field => $document) {
if ($document instanceof File) {
$request->attach($field, $document->getContent(), $document->getFileName());
$request->contentType('multipart/form-data');
$request->contentType('multipart/form-data; boundary=*');
}
}

Expand All @@ -118,7 +118,7 @@ public function post(string $endpoint, array $body = [], Attachable $attachment
$attachment->getFileName(),
$attachment->getHeaders()
);
$request->contentType('multipart/form-data');
$request->contentType('multipart/form-data; boundary=*');
}

return $request->post($this->getFinalUrl($endpoint), $body)
Expand Down

0 comments on commit 3102564

Please sign in to comment.