1 | <?php |
||
15 | class Request |
||
16 | { |
||
17 | /** |
||
18 | * the request url. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | public $endpoint; |
||
23 | /** |
||
24 | * request headers. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | public $headers; |
||
29 | |||
30 | /** |
||
31 | * request body. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | public $body; |
||
36 | |||
37 | /** |
||
38 | * the response is in form of a string. |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | public $response; |
||
43 | |||
44 | /** |
||
45 | * Request constructor. |
||
46 | * |
||
47 | * @param $endpoint |
||
48 | * @param array $headers |
||
49 | * @param array $body |
||
50 | */ |
||
51 | public function __construct($endpoint, array $headers, array $body) |
||
57 | |||
58 | public function send() |
||
62 | |||
63 | |||
64 | } |
||
65 |