diff --git a/src/Common/CelcoinBaseApi.php b/src/Common/CelcoinBaseApi.php index 4fceba5..1ceaad5 100644 --- a/src/Common/CelcoinBaseApi.php +++ b/src/Common/CelcoinBaseApi.php @@ -107,6 +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'); } } @@ -117,6 +118,7 @@ public function post(string $endpoint, array $body = [], Attachable $attachment $attachment->getFileName(), $attachment->getHeaders() ); + $request->contentType('multipart/form-data'); } return $request->post($this->getFinalUrl($endpoint), $body)