@@ 222-230 (lines=9) @@ | ||
219 | * |
|
220 | * @return mixed Normally an array |
|
221 | */ |
|
222 | public function getRequest( Request $request ) { |
|
223 | $response = $this->getClient()->request( |
|
224 | 'GET', |
|
225 | $this->apiUrl, |
|
226 | $this->getClientRequestOptions( $request, 'query' ) |
|
227 | ); |
|
228 | ||
229 | return $this->decodeResponse( $response ); |
|
230 | } |
|
231 | ||
232 | /** |
|
233 | * @since 0.2 |
|
@@ 239-247 (lines=9) @@ | ||
236 | * |
|
237 | * @return mixed Normally an array |
|
238 | */ |
|
239 | public function postRequest( Request $request ) { |
|
240 | $response = $this->getClient()->request( |
|
241 | 'POST', |
|
242 | $this->apiUrl, |
|
243 | $this->getClientRequestOptions( $request, $this->getPostRequestEncoding( $request ) ) |
|
244 | ); |
|
245 | ||
246 | return $this->decodeResponse( $response ); |
|
247 | } |
|
248 | ||
249 | /** |
|
250 | * @param ResponseInterface $response |