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 74bae69 commit 67b08adCopy full SHA for 67b08ad
components/browser_kit.rst
@@ -321,6 +321,19 @@ dedicated web crawler or scraper such as `Goutte`_::
321
322
The feature to make external HTTP requests was introduced in Symfony 4.3.
323
324
+Dealing with HTTP responses
325
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
326
+
327
+When using the BrowserKit component, you may need to deal with responses of
328
+the requests you made. To do so, you need to call the ``getResponse()``
329
+method of the ``HttpBrowser`` object. This method retrieves the last response
330
+the browser received::
331
332
+ $browser = new HttpBrowser(HttpClient::create());
333
334
+ $browser->request('GET', 'https://foo.com');
335
+ $response = $browser->getResponse();
336
337
Learn more
338
----------
339
0 commit comments