Skip to content

Commit 5845742

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Update http_client.rst
2 parents 0b7d88a + 90dc304 commit 5845742

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: http_client.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ immediately instead of waiting to receive the response::
356356
// getting the response headers waits until they arrive
357357
$contentType = $response->getHeaders()['content-type'][0];
358358

359-
// trying to get the response contents will block the execution until
360-
// the full response contents are received
361-
$contents = $response->getContent();
359+
// trying to get the response content will block the execution until
360+
// the full response content is received
361+
$content = $response->getContent();
362362

363363
This component also supports :ref:`streaming responses <http-client-streaming-responses>`
364364
for full asynchronous applications.
@@ -801,7 +801,7 @@ following methods::
801801
// gets the response body as a string
802802
$content = $response->getContent();
803803

804-
// casts the response JSON contents to a PHP array
804+
// casts the response JSON content to a PHP array
805805
$content = $response->toArray();
806806

807807
// casts the response content to a PHP stream resource
@@ -841,7 +841,7 @@ response sequentially instead of waiting for the entire response::
841841
throw new \Exception('...');
842842
}
843843

844-
// get the response contents in chunk and save them in a file
844+
// get the response content in chunks and save them in a file
845845
// response chunks implement Symfony\Contracts\HttpClient\ChunkInterface
846846
$fileHandler = fopen('/ubuntu.iso', 'w');
847847
foreach ($client->stream($response) as $chunk) {

0 commit comments

Comments
 (0)