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