| @@ 292-299 (lines=8) @@ | ||
| 289 | * |
|
| 290 | * @return mixed |
|
| 291 | */ |
|
| 292 | public function create($uri, $data = null, $options = []) |
|
| 293 | { |
|
| 294 | if (!is_null($data)) { |
|
| 295 | $options['form_params'] = $data; |
|
| 296 | } |
|
| 297 | ||
| 298 | return new HttpResponse($this->getClient()->request('POST', $uri, $options)); |
|
| 299 | } |
|
| 300 | ||
| 301 | /** |
|
| 302 | * @param string $uri |
|
| @@ 308-315 (lines=8) @@ | ||
| 305 | * |
|
| 306 | * @return mixed |
|
| 307 | */ |
|
| 308 | public function update($uri, $data = null, $options = []) |
|
| 309 | { |
|
| 310 | if (!is_null($data)) { |
|
| 311 | $options['form_params'] = $data; |
|
| 312 | } |
|
| 313 | ||
| 314 | return new HttpResponse($this->getClient()->request('PATCH', $uri, $options)); |
|
| 315 | } |
|
| 316 | ||
| 317 | /** |
|
| 318 | * @param string $uri |
|
| @@ 324-331 (lines=8) @@ | ||
| 321 | * |
|
| 322 | * @return mixed |
|
| 323 | */ |
|
| 324 | public function replace($uri, $data = null, $options = []) |
|
| 325 | { |
|
| 326 | if (!is_null($data)) { |
|
| 327 | $options['form_params'] = $data; |
|
| 328 | } |
|
| 329 | ||
| 330 | return new HttpResponse($this->getClient()->request('PUT', $uri, $options)); |
|
| 331 | } |
|
| 332 | ||
| 333 | /** |
|
| 334 | * @param string $uri |
|