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.
2 parents db62085 + d12c8f0 commit 5624d2dCopy full SHA for 5624d2d
components/browser_kit.rst
@@ -349,6 +349,18 @@ dedicated web crawler or scraper such as `Goutte`_::
349
``query``. They have to be passed as the default options argument to the
350
client which is used by the HTTP browser.
351
352
+Dealing with HTTP responses
353
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
354
+
355
+When using the BrowserKit component, you may need to deal with responses of
356
+the requests you made. To do so, call the ``getResponse()`` method of the
357
+``HttpBrowser`` object. This method returns the last response the browser received::
358
359
+ $browser = new HttpBrowser(HttpClient::create());
360
361
+ $browser->request('GET', 'https://foo.com');
362
+ $response = $browser->getResponse();
363
364
Learn more
365
----------
366
0 commit comments