File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,19 @@ dedicated web crawler or scraper such as `Goutte`_::
354
354
Dealing with HTTP responses
355
355
~~~~~~~~~~~~~~~~~~~~~~~~~~~
356
356
357
+ When using the BrowserKit component, you may need to deal with responses of
358
+ the requests you made. To do so, you need to call the ``getResponse() ``
359
+ method of the ``HttpBrowser `` object. This method retrieves the last response
360
+ the browser received::
361
+
362
+ $browser = new HttpBrowser(HttpClient::create());
363
+
364
+ $browser->request('GET', 'https://foo.com');
365
+ $response = $browser->getResponse();
366
+
367
+ Dealing with HTTP responses
368
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
369
+
357
370
When using the BrowserKit component, you may need to deal with responses of
358
371
the requests you made. To do so, you need to call the ``getResponse() ``
359
372
method of the ``HttpBrowser `` object. This method retrieves the last response
You can’t perform that action at this time.
0 commit comments