| @@ 72-80 (lines=9) @@ | ||
| 69 | ); |
|
| 70 | } |
|
| 71 | ||
| 72 | public function post(string $endpoint, array $body, array $headers = []): array |
|
| 73 | { |
|
| 74 | return $this->processResponse( |
|
| 75 | $this->guzzle->request('POST', $endpoint, [ |
|
| 76 | 'json' => $body, |
|
| 77 | 'headers' => $headers, |
|
| 78 | ]) |
|
| 79 | ); |
|
| 80 | } |
|
| 81 | ||
| 82 | public function put(string $endpoint, array $body, array $headers = []): array |
|
| 83 | { |
|
| @@ 82-90 (lines=9) @@ | ||
| 79 | ); |
|
| 80 | } |
|
| 81 | ||
| 82 | public function put(string $endpoint, array $body, array $headers = []): array |
|
| 83 | { |
|
| 84 | return $this->processResponse( |
|
| 85 | $this->guzzle->request('PUT', $endpoint, [ |
|
| 86 | 'json' => $body, |
|
| 87 | 'headers' => $headers, |
|
| 88 | ]) |
|
| 89 | ); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * @param string $endpoint |
|