| @@ 193-200 (lines=8) @@ | ||
| 190 | * |
|
| 191 | * @return mixed |
|
| 192 | */ |
|
| 193 | public function create($uri, $data = null, $options = []) |
|
| 194 | { |
|
| 195 | if (!is_null($data)) { |
|
| 196 | $options['form_params'] = $data; |
|
| 197 | } |
|
| 198 | ||
| 199 | return new HttpResponse($this->getClient()->request('POST', $uri, $options)); |
|
| 200 | } |
|
| 201 | ||
| 202 | /** |
|
| 203 | * @param string $uri |
|
| @@ 209-216 (lines=8) @@ | ||
| 206 | * |
|
| 207 | * @return mixed |
|
| 208 | */ |
|
| 209 | public function update($uri, $data = null, $options = []) |
|
| 210 | { |
|
| 211 | if (!is_null($data)) { |
|
| 212 | $options['form_params'] = $data; |
|
| 213 | } |
|
| 214 | ||
| 215 | return new HttpResponse($this->getClient()->request('PATCH', $uri, $options)); |
|
| 216 | } |
|
| 217 | ||
| 218 | /** |
|
| 219 | * @param string $uri |
|
| @@ 225-232 (lines=8) @@ | ||
| 222 | * |
|
| 223 | * @return mixed |
|
| 224 | */ |
|
| 225 | public function replace($uri, $data = null, $options = []) |
|
| 226 | { |
|
| 227 | if (!is_null($data)) { |
|
| 228 | $options['form_params'] = $data; |
|
| 229 | } |
|
| 230 | ||
| 231 | return new HttpResponse($this->getClient()->request('PUT', $uri, $options)); |
|
| 232 | } |
|
| 233 | ||
| 234 | /** |
|
| 235 | * @param string $uri |
|