File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -165,26 +165,52 @@ public function __construct(...$args)
165
165
$ this ->client = $ this ->createHttpClient ($ options );
166
166
}
167
167
168
+ /**
169
+ * Create HTTP client
170
+ *
171
+ * @param array $options
172
+ * @return HttpClient
173
+ */
168
174
private function createHttpClient (array $ options ): HttpClient
169
175
{
170
176
return new HttpClient ($ options );
171
177
}
172
178
173
- public function get ($ endpoint , array $ headers = []): Response
179
+ /**
180
+ * Performe GET request
181
+ *
182
+ * @param string $endpoint
183
+ * @param array $headers
184
+ * @return Response
185
+ */
186
+ public function get (string $ endpoint , array $ headers = []): Response
174
187
{
175
188
return $ this ->client ->get ($ endpoint , [
176
189
'headers ' => $ headers ,
177
190
]);
178
191
}
179
192
180
- public function post ($ endpoint , array $ payloads , array $ headers = []): Response
193
+ /**
194
+ * Performe POST request
195
+ *
196
+ * @param string $endpoint
197
+ * @param array $payloads
198
+ * @param array $headers
199
+ * @return Response
200
+ */
201
+ public function post (string $ endpoint , array $ payloads = [], array $ headers = []): Response
181
202
{
182
203
return $ this ->client ->post ($ endpoint , [
183
204
'json ' => $ payloads ,
184
205
'headers ' => $ headers ,
185
206
]);
186
207
}
187
208
209
+ /**
210
+ * Get debug data
211
+ *
212
+ * @return object
213
+ */
188
214
public function debugs (): object
189
215
{
190
216
return (object ) $ this ->debugs ;
You can’t perform that action at this time.
0 commit comments