Create and return a new { Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URI can contain the query string as well. Use an array to provide a URI template and additional variables to use in the URI template expansion.
string $method HTTP method. Defaults to GET:
string|array $uri Resource URI.:
array|Collection $headers HTTP headers:
string|resource|array|EntityBodyInterface $body Entity body of request (POST/PUT) or response (GET):
InvalidArgumentException if a URI array is passed that does not contain exactly two elements: the URI followed by template variables
RequestInterface} configured for the client.
public function createRequest($method = RequestInterface::GET, $uri = null, $headers = null, $body = null);