Repository navigation
Expand file tree
/
Copy pathHttpClientInterface.php
More file actions
89 lines (80 loc) · 2.52 KB
/
Copy pathHttpClientInterface.php
File metadata and controls
89 lines (80 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
namespace Github\HttpClient;
/**
* Performs requests on GitHub API. API documentation should be self-explanatory.
*
* @author Thibault Duplessis <thibault.duplessis at gmail dot com>
* @author Joseph Bielawski <stloyd@gmail.com>
*/
interface HttpClientInterface
{
/**
* Send a GET request
*
* @param string $path Request path
* @param array $parameters GET Parameters
* @param array $options Reconfigure the request for this call only
*
* @return array Data
*/
public function get($path, array $parameters = array(), array $options = array());
/**
* Send a POST request
*
* @param string $path Request path
* @param array $parameters POST Parameters
* @param array $options Reconfigure the request for this call only
*
* @return array Data
*/
public function post($path, array $parameters = array(), array $options = array());
/**
* Send a PATCH request
*
* @param string $path Request path
* @param array $parameters PATCH Parameters
* @param array $options Reconfigure the request for this call only
*
* @return array Data
*/
public function patch($path, array $parameters = array(), array $options = array());
/**
* Send a PUT request
*
* @param string $path Request path
* @param array $options Reconfigure the request for this call only
*
* @return array Data
*/
public function put($path, array $options = array());
/**
* Send a DELETE request
*
* @param string $path Request path
* @param array $parameters DELETE Parameters
* @param array $options Reconfigure the request for this call only
*
* @return array Data
*/
public function delete($path, array $parameters = array(), array $options = array());
/**
* Authenticate a user for all next requests
*/
public function authenticate();
/**
* Change an option value.
*
* @param string $name The option name
* @param mixed $value The value
*
* @return HttpClientInterface The current object instance
*/
public function setOption($name, $value);
/**
* Set HTTP headers
*
* @param array $headers
* @return HttpClientInterface The current object instance
*/
public function setHeaders(array $headers);
}