Skip to content

Commit caf53f0

Browse files
committed
Minor reword
1 parent 40e3215 commit caf53f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

http_client.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,11 @@ according to the ``multipart/form-data`` content-type. The
631631
'body' => $formData->bodyToIterable(),
632632
]);
633633

634-
HttpClient will stream the upload of the body by default. This might not work with all
635-
servers, resulting in HTTP status code 411 ("Length Required") cause there is no
636-
``Content-Length`` header. In this case, just turn the body into a string::
634+
By default, HttpClient streams the body contents when uploading them. This might
635+
not work with all servers, resulting in HTTP status code 411 ("Length Required")
636+
because there is no ``Content-Length`` header. The solution is to turn the body
637+
into a string with the following method (which will increase memory consumption
638+
when the streams are large)::
637639

638640
$client->request('POST', 'https://...', [
639641
// ...

0 commit comments

Comments
 (0)