We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b55713 commit fc7ee50Copy full SHA for fc7ee50
components/browser_kit.rst
@@ -351,6 +351,19 @@ dedicated web crawler or scraper such as `Goutte`_::
351
'.table-list-header-toggle a:nth-child(1)'
352
)->text());
353
354
+Dealing with HTTP responses
355
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Learn more
368
----------
369
0 commit comments