Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordpres.../vendor_p.../guzzleht.../guzzle/src
File: RequestOptions.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace YoastSEO_Vendor\GuzzleHttp;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* This class contains a list of built-in Guzzle request options.
[5] Fix | Delete
*
[6] Fix | Delete
* @see https://docs.guzzlephp.org/en/latest/request-options.html
[7] Fix | Delete
*/
[8] Fix | Delete
final class RequestOptions
[9] Fix | Delete
{
[10] Fix | Delete
/**
[11] Fix | Delete
* allow_redirects: (bool|array) Controls redirect behavior. Pass false
[12] Fix | Delete
* to disable redirects, pass true to enable redirects, pass an
[13] Fix | Delete
* associative to provide custom redirect settings. Defaults to "false".
[14] Fix | Delete
* This option only works if your handler has the RedirectMiddleware. When
[15] Fix | Delete
* passing an associative array, you can provide the following key value
[16] Fix | Delete
* pairs:
[17] Fix | Delete
*
[18] Fix | Delete
* - max: (int, default=5) maximum number of allowed redirects.
[19] Fix | Delete
* - strict: (bool, default=false) Set to true to use strict redirects
[20] Fix | Delete
* meaning redirect POST requests with POST requests vs. doing what most
[21] Fix | Delete
* browsers do which is redirect POST requests with GET requests
[22] Fix | Delete
* - referer: (bool, default=false) Set to true to enable the Referer
[23] Fix | Delete
* header.
[24] Fix | Delete
* - protocols: (array, default=['http', 'https']) Allowed redirect
[25] Fix | Delete
* protocols.
[26] Fix | Delete
* - on_redirect: (callable) PHP callable that is invoked when a redirect
[27] Fix | Delete
* is encountered. The callable is invoked with the request, the redirect
[28] Fix | Delete
* response that was received, and the effective URI. Any return value
[29] Fix | Delete
* from the on_redirect function is ignored.
[30] Fix | Delete
*/
[31] Fix | Delete
public const ALLOW_REDIRECTS = 'allow_redirects';
[32] Fix | Delete
/**
[33] Fix | Delete
* auth: (array) Pass an array of HTTP authentication parameters to use
[34] Fix | Delete
* with the request. The array must contain the username in index [0],
[35] Fix | Delete
* the password in index [1], and you can optionally provide a built-in
[36] Fix | Delete
* authentication type in index [2]. Pass null to disable authentication
[37] Fix | Delete
* for a request.
[38] Fix | Delete
*/
[39] Fix | Delete
public const AUTH = 'auth';
[40] Fix | Delete
/**
[41] Fix | Delete
* body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
[42] Fix | Delete
* Body to send in the request.
[43] Fix | Delete
*/
[44] Fix | Delete
public const BODY = 'body';
[45] Fix | Delete
/**
[46] Fix | Delete
* cert: (string|array) Set to a string to specify the path to a file
[47] Fix | Delete
* containing a PEM formatted SSL client side certificate. If a password
[48] Fix | Delete
* is required, then set cert to an array containing the path to the PEM
[49] Fix | Delete
* file in the first array element followed by the certificate password
[50] Fix | Delete
* in the second array element.
[51] Fix | Delete
*/
[52] Fix | Delete
public const CERT = 'cert';
[53] Fix | Delete
/**
[54] Fix | Delete
* cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
[55] Fix | Delete
* Specifies whether or not cookies are used in a request or what cookie
[56] Fix | Delete
* jar to use or what cookies to send. This option only works if your
[57] Fix | Delete
* handler has the `cookie` middleware. Valid values are `false` and
[58] Fix | Delete
* an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
[59] Fix | Delete
*/
[60] Fix | Delete
public const COOKIES = 'cookies';
[61] Fix | Delete
/**
[62] Fix | Delete
* connect_timeout: (float, default=0) Float describing the number of
[63] Fix | Delete
* seconds to wait while trying to connect to a server. Use 0 to wait
[64] Fix | Delete
* 300 seconds (the default behavior).
[65] Fix | Delete
*/
[66] Fix | Delete
public const CONNECT_TIMEOUT = 'connect_timeout';
[67] Fix | Delete
/**
[68] Fix | Delete
* crypto_method: (int) A value describing the minimum TLS protocol
[69] Fix | Delete
* version to use.
[70] Fix | Delete
*
[71] Fix | Delete
* This setting must be set to one of the
[72] Fix | Delete
* ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is
[73] Fix | Delete
* required in order to use TLS 1.3, and cURL 7.34.0 or higher is required
[74] Fix | Delete
* in order to specify a crypto method, with cURL 7.52.0 or higher being
[75] Fix | Delete
* required to use TLS 1.3.
[76] Fix | Delete
*/
[77] Fix | Delete
public const CRYPTO_METHOD = 'crypto_method';
[78] Fix | Delete
/**
[79] Fix | Delete
* debug: (bool|resource) Set to true or set to a PHP stream returned by
[80] Fix | Delete
* fopen() enable debug output with the HTTP handler used to send a
[81] Fix | Delete
* request.
[82] Fix | Delete
*/
[83] Fix | Delete
public const DEBUG = 'debug';
[84] Fix | Delete
/**
[85] Fix | Delete
* decode_content: (bool, default=true) Specify whether or not
[86] Fix | Delete
* Content-Encoding responses (gzip, deflate, etc.) are automatically
[87] Fix | Delete
* decoded.
[88] Fix | Delete
*/
[89] Fix | Delete
public const DECODE_CONTENT = 'decode_content';
[90] Fix | Delete
/**
[91] Fix | Delete
* delay: (int) The amount of time to delay before sending in milliseconds.
[92] Fix | Delete
*/
[93] Fix | Delete
public const DELAY = 'delay';
[94] Fix | Delete
/**
[95] Fix | Delete
* expect: (bool|integer) Controls the behavior of the
[96] Fix | Delete
* "Expect: 100-Continue" header.
[97] Fix | Delete
*
[98] Fix | Delete
* Set to `true` to enable the "Expect: 100-Continue" header for all
[99] Fix | Delete
* requests that sends a body. Set to `false` to disable the
[100] Fix | Delete
* "Expect: 100-Continue" header for all requests. Set to a number so that
[101] Fix | Delete
* the size of the payload must be greater than the number in order to send
[102] Fix | Delete
* the Expect header. Setting to a number will send the Expect header for
[103] Fix | Delete
* all requests in which the size of the payload cannot be determined or
[104] Fix | Delete
* where the body is not rewindable.
[105] Fix | Delete
*
[106] Fix | Delete
* By default, Guzzle will add the "Expect: 100-Continue" header when the
[107] Fix | Delete
* size of the body of a request is greater than 1 MB and a request is
[108] Fix | Delete
* using HTTP/1.1.
[109] Fix | Delete
*/
[110] Fix | Delete
public const EXPECT = 'expect';
[111] Fix | Delete
/**
[112] Fix | Delete
* form_params: (array) Associative array of form field names to values
[113] Fix | Delete
* where each value is a string or array of strings. Sets the Content-Type
[114] Fix | Delete
* header to application/x-www-form-urlencoded when no Content-Type header
[115] Fix | Delete
* is already present.
[116] Fix | Delete
*/
[117] Fix | Delete
public const FORM_PARAMS = 'form_params';
[118] Fix | Delete
/**
[119] Fix | Delete
* headers: (array) Associative array of HTTP headers. Each value MUST be
[120] Fix | Delete
* a string or array of strings.
[121] Fix | Delete
*/
[122] Fix | Delete
public const HEADERS = 'headers';
[123] Fix | Delete
/**
[124] Fix | Delete
* http_errors: (bool, default=true) Set to false to disable exceptions
[125] Fix | Delete
* when a non- successful HTTP response is received. By default,
[126] Fix | Delete
* exceptions will be thrown for 4xx and 5xx responses. This option only
[127] Fix | Delete
* works if your handler has the `httpErrors` middleware.
[128] Fix | Delete
*/
[129] Fix | Delete
public const HTTP_ERRORS = 'http_errors';
[130] Fix | Delete
/**
[131] Fix | Delete
* idn: (bool|int, default=true) A combination of IDNA_* constants for
[132] Fix | Delete
* idn_to_ascii() PHP's function (see "options" parameter). Set to false to
[133] Fix | Delete
* disable IDN support completely, or to true to use the default
[134] Fix | Delete
* configuration (IDNA_DEFAULT constant).
[135] Fix | Delete
*/
[136] Fix | Delete
public const IDN_CONVERSION = 'idn_conversion';
[137] Fix | Delete
/**
[138] Fix | Delete
* json: (mixed) Adds JSON data to a request. The provided value is JSON
[139] Fix | Delete
* encoded and a Content-Type header of application/json will be added to
[140] Fix | Delete
* the request if no Content-Type header is already present.
[141] Fix | Delete
*/
[142] Fix | Delete
public const JSON = 'json';
[143] Fix | Delete
/**
[144] Fix | Delete
* multipart: (array) Array of associative arrays, each containing a
[145] Fix | Delete
* required "name" key mapping to the form field, name, a required
[146] Fix | Delete
* "contents" key mapping to a StreamInterface|resource|string, an
[147] Fix | Delete
* optional "headers" associative array of custom headers, and an
[148] Fix | Delete
* optional "filename" key mapping to a string to send as the filename in
[149] Fix | Delete
* the part. If no "filename" key is present, then no "filename" attribute
[150] Fix | Delete
* will be added to the part.
[151] Fix | Delete
*/
[152] Fix | Delete
public const MULTIPART = 'multipart';
[153] Fix | Delete
/**
[154] Fix | Delete
* on_headers: (callable) A callable that is invoked when the HTTP headers
[155] Fix | Delete
* of the response have been received but the body has not yet begun to
[156] Fix | Delete
* download.
[157] Fix | Delete
*/
[158] Fix | Delete
public const ON_HEADERS = 'on_headers';
[159] Fix | Delete
/**
[160] Fix | Delete
* on_stats: (callable) allows you to get access to transfer statistics of
[161] Fix | Delete
* a request and access the lower level transfer details of the handler
[162] Fix | Delete
* associated with your client. ``on_stats`` is a callable that is invoked
[163] Fix | Delete
* when a handler has finished sending a request. The callback is invoked
[164] Fix | Delete
* with transfer statistics about the request, the response received, or
[165] Fix | Delete
* the error encountered. Included in the data is the total amount of time
[166] Fix | Delete
* taken to send the request.
[167] Fix | Delete
*/
[168] Fix | Delete
public const ON_STATS = 'on_stats';
[169] Fix | Delete
/**
[170] Fix | Delete
* progress: (callable) Defines a function to invoke when transfer
[171] Fix | Delete
* progress is made. The function accepts the following positional
[172] Fix | Delete
* arguments: the total number of bytes expected to be downloaded, the
[173] Fix | Delete
* number of bytes downloaded so far, the number of bytes expected to be
[174] Fix | Delete
* uploaded, the number of bytes uploaded so far.
[175] Fix | Delete
*/
[176] Fix | Delete
public const PROGRESS = 'progress';
[177] Fix | Delete
/**
[178] Fix | Delete
* proxy: (string|array) Pass a string to specify an HTTP proxy, or an
[179] Fix | Delete
* array to specify different proxies for different protocols (where the
[180] Fix | Delete
* key is the protocol and the value is a proxy string).
[181] Fix | Delete
*/
[182] Fix | Delete
public const PROXY = 'proxy';
[183] Fix | Delete
/**
[184] Fix | Delete
* query: (array|string) Associative array of query string values to add
[185] Fix | Delete
* to the request. This option uses PHP's http_build_query() to create
[186] Fix | Delete
* the string representation. Pass a string value if you need more
[187] Fix | Delete
* control than what this method provides
[188] Fix | Delete
*/
[189] Fix | Delete
public const QUERY = 'query';
[190] Fix | Delete
/**
[191] Fix | Delete
* sink: (resource|string|StreamInterface) Where the data of the
[192] Fix | Delete
* response is written to. Defaults to a PHP temp stream. Providing a
[193] Fix | Delete
* string will write data to a file by the given name.
[194] Fix | Delete
*/
[195] Fix | Delete
public const SINK = 'sink';
[196] Fix | Delete
/**
[197] Fix | Delete
* synchronous: (bool) Set to true to inform HTTP handlers that you intend
[198] Fix | Delete
* on waiting on the response. This can be useful for optimizations. Note
[199] Fix | Delete
* that a promise is still returned if you are using one of the async
[200] Fix | Delete
* client methods.
[201] Fix | Delete
*/
[202] Fix | Delete
public const SYNCHRONOUS = 'synchronous';
[203] Fix | Delete
/**
[204] Fix | Delete
* ssl_key: (array|string) Specify the path to a file containing a private
[205] Fix | Delete
* SSL key in PEM format. If a password is required, then set to an array
[206] Fix | Delete
* containing the path to the SSL key in the first array element followed
[207] Fix | Delete
* by the password required for the certificate in the second element.
[208] Fix | Delete
*/
[209] Fix | Delete
public const SSL_KEY = 'ssl_key';
[210] Fix | Delete
/**
[211] Fix | Delete
* stream: Set to true to attempt to stream a response rather than
[212] Fix | Delete
* download it all up-front.
[213] Fix | Delete
*/
[214] Fix | Delete
public const STREAM = 'stream';
[215] Fix | Delete
/**
[216] Fix | Delete
* verify: (bool|string, default=true) Describes the SSL certificate
[217] Fix | Delete
* verification behavior of a request. Set to true to enable SSL
[218] Fix | Delete
* certificate verification using the system CA bundle when available
[219] Fix | Delete
* (the default). Set to false to disable certificate verification (this
[220] Fix | Delete
* is insecure!). Set to a string to provide the path to a CA bundle on
[221] Fix | Delete
* disk to enable verification using a custom certificate.
[222] Fix | Delete
*/
[223] Fix | Delete
public const VERIFY = 'verify';
[224] Fix | Delete
/**
[225] Fix | Delete
* timeout: (float, default=0) Float describing the timeout of the
[226] Fix | Delete
* request in seconds. Use 0 to wait indefinitely (the default behavior).
[227] Fix | Delete
*/
[228] Fix | Delete
public const TIMEOUT = 'timeout';
[229] Fix | Delete
/**
[230] Fix | Delete
* read_timeout: (float, default=default_socket_timeout ini setting) Float describing
[231] Fix | Delete
* the body read timeout, for stream requests.
[232] Fix | Delete
*/
[233] Fix | Delete
public const READ_TIMEOUT = 'read_timeout';
[234] Fix | Delete
/**
[235] Fix | Delete
* version: (float) Specifies the HTTP protocol version to attempt to use.
[236] Fix | Delete
*/
[237] Fix | Delete
public const VERSION = 'version';
[238] Fix | Delete
/**
[239] Fix | Delete
* force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
[240] Fix | Delete
*/
[241] Fix | Delete
public const FORCE_IP_RESOLVE = 'force_ip_resolve';
[242] Fix | Delete
}
[243] Fix | Delete
[244] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function