public function RequestFactoryInterface::fromParts

Create a request from URL parts as returned from parse_url()

Parameters

string $method HTTP method (GET, POST, PUT, HEAD, DELETE, etc):

array $urlParts URL parts containing the same keys as parse_url():

  • scheme: e.g. http
  • host: e.g. www.guzzle-project.com
  • port: e.g. 80
  • user: e.g. michael
  • pass: e.g. rocks
  • path: e.g. / OR /index.html
  • query: after the question mark ?

array|Collection $headers HTTP headers:

string|resource|array|EntityBodyInterface $body Body to send in the request:

string $protocol Protocol (HTTP, SPYDY, etc):

string $protocolVersion 1.0, 1.1, etc:

Return value

RequestInterface

1 method overrides RequestFactoryInterface::fromParts()
RequestFactory::fromParts in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/RequestFactory.php
Create a request from URL parts as returned from parse_url()

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/RequestFactoryInterface.php, line 43

Class

RequestFactoryInterface
Request factory used to create HTTP requests

Namespace

Guzzle\Http\Message

Code

public function fromParts($method, array $urlParts, $headers = null, $body = null, $protocol = 'HTTP', $protocolVersion = '1.1');