File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
/**
19
19
* Implements methods for HTTP requests.
20
+ *
21
+ * Used by Cake\Network\Http\Client to contain request information
22
+ * for making requests.
20
23
*/
21
24
class Request {
22
25
@@ -46,6 +49,13 @@ class Request {
46
49
'User-Agent ' => 'CakePHP '
47
50
];
48
51
52
+ /**
53
+ * Get/Set the HTTP method.
54
+ *
55
+ * @param string|null $method The method for the request.
56
+ * @return mixed Either this or the current method.
57
+ * @throws Cake\Error\Exception On invalid methods.
58
+ */
49
59
public function method ($ method = null ) {
50
60
if ($ method === null ) {
51
61
return $ this ->_method ;
@@ -58,6 +68,12 @@ public function method($method = null) {
58
68
return $ this ;
59
69
}
60
70
71
+ /**
72
+ * Get/Set the url for the request.
73
+ *
74
+ * @param string|null $url The url for the request. Leave null for get
75
+ * @return mixed Either $this or the url value.
76
+ */
61
77
public function url ($ url = null ) {
62
78
if ($ url === null ) {
63
79
return $ this ->_url ;
You can’t perform that action at this time.
0 commit comments