public function Client::post

Create a POST request for the client

Parameters

string|array $uri Resource URI:

array|Collection $headers HTTP headers:

array|Collection|string|EntityBodyInterface $postBody POST body. Can be a string, EntityBody, or: associative array of POST fields to send in the body of the request. Prefix a value in the array with the @ symbol to reference a file.

Return value

EntityEnclosingRequestInterface

Overrides ClientInterface::post

See also

Guzzle\Http\ClientInterface::createRequest()

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Client.php, line 334

Class

Client
HTTP client

Namespace

Guzzle\Http

Code

public function post($uri = null, $headers = null, $postBody = null) {
  return $this
    ->createRequest('POST', $uri, $headers, $postBody);
}