Oihana PHP Enums

GuzzleOption uses ConstantsTrait

Enumeration of Guzzle HTTP client request options.

These constants map to the keys accepted by Guzzle's request options array (timeout, base_uri, headers, form_params, json, query, etc.).

Reference: https://docs.guzzlephp.org/en/stable/request-options.html

Example:

$client = new Client([ GuzzleOption::BASE_URI => $this->issuer , GuzzleOption::TIMEOUT => 10 ]);

$response = $client->request( HttpMethod::POST , $path ,
[
    GuzzleOption::HEADERS     => [ HttpHeader::AUTHORIZATION => '...' ],
    GuzzleOption::FORM_PARAMS => [ ... ],
]) ;
Tags
author

Marc Alcaraz (ekameleon)

since
1.1.0

Table of Contents

Constants

ALLOW_REDIRECTS  : string = 'allow_redirects'
AUTH  : string = 'auth'
BASE_URI  : string = 'base_uri'
BODY  : string = 'body'
CERT  : string = 'cert'
CONNECT_TIMEOUT  : string = 'connect_timeout'
COOKIES  : string = 'cookies'
DEBUG  : string = 'debug'
DECODE_CONTENT  : string = 'decode_content'
DELAY  : string = 'delay'
FORM_PARAMS  : string = 'form_params'
HANDLER  : string = 'handler'
HEADERS  : string = 'headers'
HTTP_ERRORS  : string = 'http_errors'
JSON  : string = 'json'
MULTIPART  : string = 'multipart'
ON_HEADERS  : string = 'on_headers'
ON_STATS  : string = 'on_stats'
PROGRESS  : string = 'progress'
PROXY  : string = 'proxy'
QUERY  : string = 'query'
READ_TIMEOUT  : string = 'read_timeout'
SINK  : string = 'sink'
SSL_KEY  : string = 'ssl_key'
STREAM  : string = 'stream'
SYNCHRONOUS  : string = 'synchronous'
TIMEOUT  : string = 'timeout'
VERIFY  : string = 'verify'
VERSION  : string = 'version'

Constants

ALLOW_REDIRECTS

public string ALLOW_REDIRECTS = 'allow_redirects'

CONNECT_TIMEOUT

public string CONNECT_TIMEOUT = 'connect_timeout'

DECODE_CONTENT

public string DECODE_CONTENT = 'decode_content'

READ_TIMEOUT

public string READ_TIMEOUT = 'read_timeout'
On this page

Search results