| @@ 54-66 (lines=13) @@ | ||
| 51 | * @param array $headers |
|
| 52 | * @return array |
|
| 53 | */ |
|
| 54 | public function post($uri, array $body = [], array $headers = []) |
|
| 55 | { |
|
| 56 | $response = $this |
|
| 57 | ->client |
|
| 58 | ->post( |
|
| 59 | $uri, [ |
|
| 60 | 'headers' => $headers, |
|
| 61 | 'form_params' => $body, |
|
| 62 | ] |
|
| 63 | ); |
|
| 64 | ||
| 65 | return $this->parseResponse($response); |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @param string $uri |
|
| @@ 74-86 (lines=13) @@ | ||
| 71 | * @param array $headers |
|
| 72 | * @return mixed |
|
| 73 | */ |
|
| 74 | public function put($uri, array $body = [], array $headers = []) |
|
| 75 | { |
|
| 76 | $response = $this |
|
| 77 | ->client |
|
| 78 | ->put( |
|
| 79 | $uri, [ |
|
| 80 | 'headers' => $headers, |
|
| 81 | 'form_params' => $body, |
|
| 82 | ] |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $this->parseResponse($response); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @param string $uri |
|
| @@ 94-104 (lines=11) @@ | ||
| 91 | * @param array $headers |
|
| 92 | * @return mixed |
|
| 93 | */ |
|
| 94 | public function delete($uri, array $body = [], array $headers = []) |
|
| 95 | { |
|
| 96 | $response = $this |
|
| 97 | ->client |
|
| 98 | ->delete($uri, [ |
|
| 99 | 'headers' => $headers, |
|
| 100 | 'form_params' => $body, |
|
| 101 | ]); |
|
| 102 | ||
| 103 | return $this->parseResponse($response); |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * @param ResponseInterface $response |
|