public function Client::put in Little helpers 7
Same name and namespace in other branches
- 7.2 src/Rest/Client.php \Drupal\little_helpers\Rest\Client::put()
Send a PUT request to the API.
Parameters
string $path: The path to call.
array $query: An array of query parameters.
mixed $data: JSON encodeable data.
array $options: Options for @see drupal_http_request().
Return value
array The decoded data from the response.
File
- src/
Rest/ Client.php, line 79
Class
- Client
- This a simple JSON REST Client based on drupal_http_request().
Namespace
Drupal\little_helpers\RestCode
public function put($path, array $query = [], $data = NULL, array $options = []) {
$options['method'] = 'PUT';
return $this
->send($path, $query, $data, $options);
}