Thanks to visit codestin.com Credit goes to github.com
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 3c97aee + f1f5f7d commit 8e943c7Copy full SHA for 8e943c7
components/browser_kit.rst
@@ -357,6 +357,18 @@ dedicated web crawler or scraper such as `Goutte`_::
357
``query``. They have to be passed as the default options argument to the
358
client which is used by the HTTP browser.
359
360
+Dealing with HTTP responses
361
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
362
+
363
+When using the BrowserKit component, you may need to deal with responses of
364
+the requests you made. To do so, call the ``getResponse()`` method of the
365
+``HttpBrowser`` object. This method returns the last response the browser received::
366
367
+ $browser = new HttpBrowser(HttpClient::create());
368
369
+ $browser->request('GET', 'https://foo.com');
370
+ $response = $browser->getResponse();
371
372
Learn more
373
----------
374
0 commit comments