@@ 76-84 (lines=9) @@ | ||
73 | * @param array $headers |
|
74 | * @return array |
|
75 | */ |
|
76 | public function post(string $endpoint, array $body, array $headers = []): array |
|
77 | { |
|
78 | return $this->processResponse( |
|
79 | $this->guzzle->request('POST', $endpoint, [ |
|
80 | 'json' => $body, |
|
81 | 'headers' => $headers, |
|
82 | ]) |
|
83 | ); |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * @param string $endpoint |
|
@@ 92-100 (lines=9) @@ | ||
89 | * @param array $headers |
|
90 | * @return array |
|
91 | */ |
|
92 | public function put(string $endpoint, array $body, array $headers = []): array |
|
93 | { |
|
94 | return $this->processResponse( |
|
95 | $this->guzzle->request('PUT', $endpoint, [ |
|
96 | 'json' => $body, |
|
97 | 'headers' => $headers, |
|
98 | ]) |
|
99 | ); |
|
100 | } |
|
101 | ||
102 | /** |
|
103 | * @param string $endpoint |