Skip to content

Commit 3d2e90e

Browse files
committed
Merge branch '5.1' into 5.x
* 5.1: Update http_client.rst
2 parents b1fb1fe + 13cb125 commit 3d2e90e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http_client.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,11 @@ when the streams are large)::
659659
'body' => $formData->bodyToString(),
660660
]);
661661

662+
If you need to add a custom HTTP header to the upload, you can do::
663+
664+
$headers = $formData->getPreparedHeaders()->toArray();
665+
$headers[] = 'X-Foo: bar';
666+
662667
Cookies
663668
~~~~~~~
664669

0 commit comments

Comments
 (0)