diff --git a/src/Services/EntrepotApi/AbstractEntrepotApiService.php b/src/Services/EntrepotApi/AbstractEntrepotApiService.php index 44bd1715..1d8c080a 100644 --- a/src/Services/EntrepotApi/AbstractEntrepotApiService.php +++ b/src/Services/EntrepotApi/AbstractEntrepotApiService.php @@ -51,7 +51,7 @@ public function setEntrepotApiService(EntrepotApiService $entrepotApiService): s * @param array $formFields correspond à "Request Body" dans le swagger * @param array $query correspond aux paramètes "Query" dans le swagger */ - protected function postFile(string $url, string $filepath, array $formFields = [], array $query = []): array + protected function sendFile(string $method, string $url, string $filepath, array $formFields = [], array $query = []): array { $formFields['file'] = DataPart::fromPath($filepath); // ajout du fichier dans $formFields $formData = new FormDataPart($formFields); @@ -59,7 +59,7 @@ protected function postFile(string $url, string $filepath, array $formFields = [ $body = $formData->bodyToIterable(); $headers = $formData->getPreparedHeaders()->toArray(); - return $this->request('POST', $url, $body, $query, $headers, true); + return $this->request($method, $url, $body, $query, $headers, true); } /**