File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,29 @@ Making Request
2828
2929To make a request you use the client's request method.
3030The first two arguments are for the HTTP method and the request url.
31+ The request method will return a crawler object.
3132
3233.. code-block :: php
3334
3435 use ACME\Client;
3536
3637 $client = new Client();
37- $response = $client->request('GET', 'http://symfony.com');
38+ $crawler = $client->request('GET', 'http://symfony.com');
3839
3940 Clicking Links
4041~~~~~~~~~~~~~~
4142
43+ select a link with the crawler and pass it to the click method to click on the link.
44+
45+ .. code-block :: php
46+
47+ use ACME\Client;
48+
49+ $client = new Client();
50+ $crawler = $client->request('GET', 'http://symfony.com');
51+ $link = $crawler->selectLink('Go elsewhere...')->link();
52+ $client->click($link);
53+
4254 Submiting Forms
4355~~~~~~~~~~~~~~~~
4456
You can’t perform that action at this time.
0 commit comments