Skip to content

Commit 13cb125

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Update http_client.rst
2 parents 905c051 + 22312d3 commit 13cb125

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
@@ -629,6 +629,11 @@ when the streams are large)::
629629
'body' => $formData->bodyToString(),
630630
]);
631631

632+
If you need to add a custom HTTP header to the upload, you can do::
633+
634+
$headers = $formData->getPreparedHeaders()->toArray();
635+
$headers[] = 'X-Foo: bar';
636+
632637
Cookies
633638
~~~~~~~
634639

0 commit comments

Comments
 (0)