Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ClientTrait.php

function ClientTrait::post

Create and send an HTTP POST request.

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 URL can contain the query string as well.

Parameters

string|UriInterface $uri URI object or string.:

array $options Request options to apply.:

Throws

GuzzleException

File

vendor/guzzlehttp/guzzle/src/ClientTrait.php, line 93

Class

ClientTrait
Client interface for sending HTTP requests.

Namespace

GuzzleHttp

Code

public function post($uri, array $options = []) : ResponseInterface {
    return $this->request('POST', $uri, $options);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal