diff --git a/http_client.rst b/http_client.rst index 0d8648643b7..14c73d4eb82 100644 --- a/http_client.rst +++ b/http_client.rst @@ -642,6 +642,11 @@ when the streams are large):: 'body' => $formData->bodyToString(), ]); +If you need to add a custom HTTP header to the upload, you can do:: + + $headers = $formData->getPreparedHeaders()->toArray(); + $headers[] = 'X-Foo: bar'; + Cookies ~~~~~~~