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