From e4bfad31dc4fd910f5f01aea02a6ee6ddbeecab3 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 17 Jul 2024 09:58:11 +0200 Subject: [PATCH] send necessary HTTP headers --- http_client.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/http_client.rst b/http_client.rst index bc950a382e8..c8c3094375a 100644 --- a/http_client.rst +++ b/http_client.rst @@ -676,6 +676,7 @@ when the streams are large):: $client->request('POST', 'https://...', [ // ... 'body' => $formData->bodyToString(), + 'headers' => $formData->getPreparedHeaders()->toArray(), ]); If you need to add a custom HTTP header to the upload, you can do::