Open Journal Systems
3.3.0
|
Protected Member Functions | |
processPostFields () | |
![]() | |
getEventArray () | |
processResponse (array $context=array()) | |
Protected Attributes | |
$body | |
$expectCutoff = 1048576 | |
$postFields | |
$postFiles = array() | |
![]() | |
$client | |
$curlOptions | |
$eventDispatcher | |
$isRedirect = false | |
$method | |
$password | |
$response | |
$responseBody | |
$state | |
$url | |
$username | |
![]() | |
$headerFactory | |
$headers | |
$params | |
$protocol = 'HTTP' | |
$protocolVersion = '1.1' | |
Additional Inherited Members | |
![]() | |
static | getAllEvents () |
static | onRequestError (Event $event) |
![]() | |
const | CONNECT = 'CONNECT' |
const | DELETE = 'DELETE' |
const | GET = 'GET' |
const | HEAD = 'HEAD' |
const | OPTIONS = 'OPTIONS' |
const | PATCH = 'PATCH' |
const | POST = 'POST' |
const | PUT = 'PUT' |
const | STATE_COMPLETE = 'complete' |
const | STATE_ERROR = 'error' |
const | STATE_NEW = 'new' |
const | STATE_TRANSFER = 'transfer' |
const | TRACE = 'TRACE' |
![]() | |
const | MULTIPART = 'multipart/form-data' |
const | URL_ENCODED = 'application/x-www-form-urlencoded; charset=utf-8' |
HTTP request that sends an entity-body in the request message (POST, PUT, PATCH, DELETE)
Definition at line 14 of file EntityEnclosingRequest.php.
Guzzle\Http\Message\EntityEnclosingRequest::__construct | ( | $method, | |
$url, | |||
$headers = array() |
|||
) |
string | $method | HTTP method |
string | Url | $url | HTTP URL to connect to. The URI scheme, host header, and URI are parsed from the full URL. If query string parameters are present they will be parsed as well. |
array | Collection | $headers | HTTP headers |
Reimplemented from Guzzle\Http\Message\Request.
Definition at line 40 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\AbstractMessage\$headers, Guzzle\Http\Message\Request\$method, and Guzzle\Http\Message\Request\$url.
Guzzle\Http\Message\EntityEnclosingRequest::__toString | ( | ) |
Reimplemented from Guzzle\Http\Message\Request.
Definition at line 49 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\$body.
Guzzle\Http\Message\EntityEnclosingRequest::addPostFields | ( | $fields | ) |
Add POST fields to use in the request
QueryString | array | $fields | POST fields |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 161 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\processPostFields().
Guzzle\Http\Message\EntityEnclosingRequest::addPostFile | ( | $field, | |
$filename = null , |
|||
$contentType = null , |
|||
$postname = null |
|||
) |
Add a POST file to the upload
string | $field | POST field to use (e.g. file). Used to reference content from the server. |
string | $filename | Full path to the file. Do not include the @ symbol. |
string | $contentType | Optional Content-Type to add to the Content-Disposition. Default behavior is to guess. Set to false to not specify. |
string | $postname | The name of the file, when posted. (e.g. rename the file) |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 195 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\processPostFields().
Referenced by Guzzle\Http\Message\EntityEnclosingRequest\addPostFiles().
Guzzle\Http\Message\EntityEnclosingRequest::addPostFiles | ( | array | $files | ) |
Add POST files to use in the upload
array | $files | An array of POST fields => filenames where filename can be a string or PostFileInterface |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 226 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\addPostFile().
Guzzle\Http\Message\EntityEnclosingRequest::configureRedirects | ( | $strict = false , |
|
$maxRedirects = 5 |
|||
) |
Configure how redirects are handled for the request
bool | $strict | Set to true to follow strict RFC compliance when redirecting POST requests. Most browsers with follow a 301-302 redirect for a POST request with a GET request. This is the default behavior of Guzzle. Enable strict redirects to redirect these responses with a POST rather than a GET request. |
int | $maxRedirects | Specify the maximum number of allowed redirects. Set to 0 to disable redirects. |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 131 of file EntityEnclosingRequest.php.
References Guzzle\Http\RedirectPlugin\DISABLE, Guzzle\Http\Message\AbstractMessage\getParams(), Guzzle\Http\RedirectPlugin\MAX_REDIRECTS, and Guzzle\Http\RedirectPlugin\STRICT_REDIRECTS.
Guzzle\Http\Message\EntityEnclosingRequest::getBody | ( | ) |
Get the body of the request if set
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 107 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\$body.
Guzzle\Http\Message\EntityEnclosingRequest::getPostField | ( | $field | ) |
Get a POST field from the request
string | $field | Field to retrieve |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 143 of file EntityEnclosingRequest.php.
Guzzle\Http\Message\EntityEnclosingRequest::getPostFields | ( | ) |
Get the post fields that will be used in the request
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 148 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\$postFields.
Guzzle\Http\Message\EntityEnclosingRequest::getPostFile | ( | $fieldName | ) |
Get a POST file from the request
string | $fieldName | POST fields to retrieve |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 182 of file EntityEnclosingRequest.php.
Guzzle\Http\Message\EntityEnclosingRequest::getPostFiles | ( | ) |
Returns an associative array of POST field names to PostFileInterface objects
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 177 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\$postFiles.
|
protected |
Determine what type of request should be sent based on post fields
Definition at line 248 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\AbstractMessage\removeHeader(), and Guzzle\Http\Message\AbstractMessage\setHeader().
Referenced by Guzzle\Http\Message\EntityEnclosingRequest\addPostFields(), Guzzle\Http\Message\EntityEnclosingRequest\addPostFile(), Guzzle\Http\Message\EntityEnclosingRequest\removePostField(), Guzzle\Http\Message\EntityEnclosingRequest\removePostFile(), and Guzzle\Http\Message\EntityEnclosingRequest\setPostField().
Guzzle\Http\Message\EntityEnclosingRequest::removePostField | ( | $field | ) |
Remove a POST field or file by name
string | $field | Name of the POST field or file to remove |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 169 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\processPostFields().
Guzzle\Http\Message\EntityEnclosingRequest::removePostFile | ( | $fieldName | ) |
Remove a POST file from the request
string | $fieldName | POST file field name to remove |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 187 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\processPostFields().
Guzzle\Http\Message\EntityEnclosingRequest::setBody | ( | $body, | |
$contentType = null |
|||
) |
Set the body of the request
string | resource | EntityBodyInterface | $body | Body to use in the entity body of the request |
string | $contentType | Content-Type to set. Leave null to use an existing Content-Type or to guess the Content-Type |
RequestException | if the protocol is < 1.1 and Content-Length can not be determined |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 69 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\$body, Guzzle\Http\EntityBody\factory(), Guzzle\Http\Message\AbstractMessage\hasHeader(), and Guzzle\Http\Message\AbstractMessage\setHeader().
Guzzle\Http\Message\EntityEnclosingRequest::setExpectHeaderCutoff | ( | $size | ) |
Set the size that the entity body of the request must exceed before adding the Expect: 100-Continue header.
int | bool | $size | Cutoff in bytes. Set to false to never send the expect header (even with non-seekable data) |
Definition at line 119 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\AbstractMessage\removeHeader(), and Guzzle\Http\Message\AbstractMessage\setHeader().
Guzzle\Http\Message\EntityEnclosingRequest::setPostField | ( | $key, | |
$value | |||
) |
Set a POST field value
string | $key | Key to set |
string | $value | Value to set |
Implements Guzzle\Http\Message\EntityEnclosingRequestInterface.
Definition at line 153 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\EntityEnclosingRequest\processPostFields().
Guzzle\Http\Message\EntityEnclosingRequest::setState | ( | $state, | |
array | $context = array() |
||
) |
Set the state of the request
string | $state | State of the request ('complete', 'transfer', 'new', 'error') |
array | $context | Contextual information about the state change |
Reimplemented from Guzzle\Http\Message\Request.
Definition at line 59 of file EntityEnclosingRequest.php.
References Guzzle\Http\Message\Request\$state, and Guzzle\Http\Message\AbstractMessage\setHeader().
|
protected |
$body Body of the request
Definition at line 26 of file EntityEnclosingRequest.php.
Referenced by Guzzle\Http\Message\EntityEnclosingRequest\__toString(), Guzzle\Http\Message\EntityEnclosingRequest\getBody(), and Guzzle\Http\Message\EntityEnclosingRequest\setBody().
|
protected |
When the size of the body is greater than 1MB, then send Expect: 100-Continue
Definition at line 20 of file EntityEnclosingRequest.php.
|
protected |
POST fields to use in the EntityBody
Definition at line 32 of file EntityEnclosingRequest.php.
Referenced by Guzzle\Http\Message\EntityEnclosingRequest\getPostFields().
|
protected |
POST files to send with the request
Definition at line 38 of file EntityEnclosingRequest.php.
Referenced by Guzzle\Http\Message\EntityEnclosingRequest\getPostFiles().