File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ If you have created a PSR-7 request object you can send it using
5959 'http://example.com/search',
6060 ClientRequest::METHOD_GET
6161 );
62- $client = new Client();
63- $response = $client ->sendRequest($request);
62+ $http = new Client();
63+ $response = $http ->sendRequest($request);
6464
6565Creating Multipart Requests with Files
6666======================================
@@ -477,7 +477,7 @@ instead. You can force select a transport adapter using a constructor option::
477477
478478 use Cake\Http\Client\Adapter\Stream;
479479
480- $client = new Client(['adapter' => Stream::class]);
480+ $http = new Client(['adapter' => Stream::class]);
481481
482482Events
483483======
@@ -489,6 +489,8 @@ caching, logging etc.
489489HttpClient.beforeSend
490490---------------------
491491
492+ ::
493+
492494 // Somewhere before calling one of the HTTP client's methods which makes a request
493495 $http->getEventManager()->on(
494496 'HttpClient.beforeSend',
@@ -512,6 +514,8 @@ HttpClient.beforeSend
512514HttpClient.afterSend
513515---------------------
514516
517+ ::
518+
515519 // Somewhere before calling one of the HTTP client's methods which makes a request
516520 $http->getEventManager()->on(
517521 'HttpClient.afterSend',
You can’t perform that action at this time.
0 commit comments