You are here

public static function RequestInterface::create in RESTful 7.2

Creates a Request based on a given URI and configuration.

Parameters

string $path: The requested path.

array $query: The query string parameters being passed.

string $method: A valid HTTP method

HttpHeaderBag $headers: The headers for the request

bool $via_router: Boolean indicating that if the requested was created via the Drupal's menu router.

string $csrf_token: A CSRF token that applies to the current request.

array $cookies: An array of key value pairs containing information about the cookies.

array $files: An array of key value pairs containing information about the files.

array $server: An array of key value pairs containing information about the server.

Return value

RequestInterface Request A Request instance

1 method overrides RequestInterface::create()
Request::create in src/Http/Request.php
Creates a Request based on a given URI and configuration.

File

src/Http/RequestInterface.php, line 62
Contains \Drupal\restful\Http\RequestInterface.

Class

RequestInterface

Namespace

Drupal\restful\Http

Code

public static function create($path, array $query = array(), $method = 'GET', HttpHeaderBag $headers = NULL, $via_router = FALSE, $csrf_token = NULL, array $cookies = array(), array $files = array(), array $server = array());