Skip to content

Commit 00a85a7

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Mentioned the toStream() method
2 parents 82deb29 + 0037c9a commit 00a85a7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

components/http_client.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ following methods::
341341
// gets the response body as a string
342342
$content = $response->getContent();
343343

344+
// casts the response JSON contents to a PHP array
345+
$content = $response->toArray();
346+
344347
// cancels the request/response
345348
$response->cancel();
346349

@@ -350,16 +353,15 @@ following methods::
350353
// you can get individual info too
351354
$startTime = $response->getInfo('start_time');
352355

356+
// returns detailed logs about the requests and responses of the HTTP transaction
357+
$httpLogs = $response->getInfo('debug');
358+
353359
.. note::
354360

355361
``$response->getInfo()`` is non-blocking: it returns *live* information
356362
about the response. Some of them might not be known yet (e.g. ``http_code``)
357363
when you'll call it.
358364

359-
.. tip::
360-
361-
Call ``$response->getInfo('debug')`` to get detailed logs about the HTTP transaction.
362-
363365
.. _http-client-streaming-responses:
364366

365367
Streaming Responses

0 commit comments

Comments
 (0)