You'll probably want to use one of the convenience methods instead.
public send ( string $method, string $url, array $parameters = [], array $headers = [] ) : array | ||
$method | string | The HTTP method to use. |
$url | string | The URL to request. |
$parameters | array | Optional. Query parameters. |
$headers | array | Optional. HTTP headers. |
return | array | Response data. - array|object body The response body. Type is controlled by Request::setReturnAssoc(). - array headers Response headers. - int status HTTP status code. - string url The requested URL. |