File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,29 @@ Making Request
28
28
29
29
To make a request you use the client's request method.
30
30
The first two arguments are for the HTTP method and the request url.
31
+ The request method will return a crawler object.
31
32
32
33
.. code-block :: php
33
34
34
35
use ACME\Client;
35
36
36
37
$client = new Client();
37
- $response = $client->request('GET', 'http://symfony.com');
38
+ $crawler = $client->request('GET', 'http://symfony.com');
38
39
39
40
Clicking Links
40
41
~~~~~~~~~~~~~~
41
42
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
+
42
54
Submiting Forms
43
55
~~~~~~~~~~~~~~~~
44
56
You can’t perform that action at this time.
0 commit comments