Class Guzzle\Http\Message\EntityEnclosingRequest

InheritanceGuzzle\Http\Message\EntityEnclosingRequest » Guzzle\Http\Message\Request » Guzzle\Http\Message\AbstractMessage
ImplementsGuzzle\Http\Message\EntityEnclosingRequestInterface, Guzzle\Http\Message\MessageInterface, Guzzle\Http\Message\RequestInterface

HTTP request that sends an entity-body in the request message (POST, PUT, PATCH, DELETE)

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$body Guzzle\Http\EntityBodyInterface Body of the request Guzzle\Http\Message\EntityEnclosingRequest
$client Guzzle\Http\ClientInterface Guzzle\Http\Message\Request
$curlOptions Guzzle\Common\Collection CURL specific transfer options Guzzle\Http\Message\Request
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface Guzzle\Http\Message\Request
$expectCutoff int When the size of the body is greater than 1MB, then send Expect: 100-Continue Guzzle\Http\Message\EntityEnclosingRequest
$headerFactory Guzzle\Http\Message\Header\HeaderFactoryInterface Guzzle\Http\Message\AbstractMessage
$headers array HTTP header collection Guzzle\Http\Message\AbstractMessage
$isRedirect bool Guzzle\Http\Message\Request
$method string HTTP method (GET, PUT, POST, DELETE, HEAD, OPTIONS, TRACE) Guzzle\Http\Message\Request
$params Guzzle\Common\Collection Custom message parameters that are extendable by plugins Guzzle\Http\Message\AbstractMessage
$password string Auth password Guzzle\Http\Message\Request
$postFields Guzzle\Http\QueryString POST fields to use in the EntityBody Guzzle\Http\Message\EntityEnclosingRequest
$postFiles array POST files to send with the request Guzzle\Http\Message\EntityEnclosingRequest
$protocol string Message protocol Guzzle\Http\Message\AbstractMessage
$protocolVersion string HTTP protocol version of the message Guzzle\Http\Message\AbstractMessage
$response Guzzle\Http\Message\Response Response of the request Guzzle\Http\Message\Request
$responseBody Guzzle\Http\EntityBodyInterface Response body Guzzle\Http\Message\Request
$state string State of the request object Guzzle\Http\Message\Request
$url Guzzle\Http\Url HTTP Url Guzzle\Http\Message\Request
$username string Authentication username Guzzle\Http\Message\Request

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__clone() Guzzle\Http\Message\Request
__construct() Guzzle\Http\Message\EntityEnclosingRequest
__toString() Guzzle\Http\Message\EntityEnclosingRequest
addCacheControlDirective() Guzzle\Http\Message\AbstractMessage
addCookie() Guzzle\Http\Message\Request
addHeader() Guzzle\Http\Message\AbstractMessage
addHeaders() Guzzle\Http\Message\AbstractMessage
addPostFields() Guzzle\Http\Message\EntityEnclosingRequest
addPostFile() Guzzle\Http\Message\EntityEnclosingRequest
addPostFiles() Guzzle\Http\Message\EntityEnclosingRequest
addSubscriber() Guzzle\Http\Message\Request
canCache() Guzzle\Http\Message\Request
configureRedirects() Guzzle\Http\Message\EntityEnclosingRequest
dispatch() Guzzle\Http\Message\Request
getAllEvents() Guzzle\Http\Message\Request
getBody() Guzzle\Http\Message\EntityEnclosingRequest
getCacheControlDirective() Guzzle\Http\Message\AbstractMessage
getClient() Guzzle\Http\Message\Request
getCookie() Guzzle\Http\Message\Request
getCookies() Guzzle\Http\Message\Request
getCurlOptions() Guzzle\Http\Message\Request
getEventDispatcher() Guzzle\Http\Message\Request
getHeader() Guzzle\Http\Message\AbstractMessage
getHeaderLines() Guzzle\Http\Message\AbstractMessage
getHeaders() Guzzle\Http\Message\AbstractMessage
getHost() Guzzle\Http\Message\Request
getMethod() Guzzle\Http\Message\Request
getParams() Guzzle\Http\Message\AbstractMessage
getPassword() Guzzle\Http\Message\Request
getPath() Guzzle\Http\Message\Request
getPort() Guzzle\Http\Message\Request
getPostField() Guzzle\Http\Message\EntityEnclosingRequest
getPostFields() Guzzle\Http\Message\EntityEnclosingRequest
getPostFile() Guzzle\Http\Message\EntityEnclosingRequest
getPostFiles() Guzzle\Http\Message\EntityEnclosingRequest
getProtocolVersion() Guzzle\Http\Message\Request
getQuery() Guzzle\Http\Message\Request
getRawHeaders() Get the raw message headers as a string Guzzle\Http\Message\MessageInterface
getResource() Guzzle\Http\Message\Request
getResponse() Guzzle\Http\Message\Request
getResponseBody() Guzzle\Http\Message\Request
getScheme() Guzzle\Http\Message\Request
getState() Guzzle\Http\Message\Request
getTokenizedHeader() Guzzle\Http\Message\AbstractMessage
getUrl() Guzzle\Http\Message\Request
getUsername() Guzzle\Http\Message\Request
hasCacheControlDirective() Guzzle\Http\Message\AbstractMessage
hasHeader() Guzzle\Http\Message\AbstractMessage
isRedirect() Guzzle\Http\Message\Request
isResponseBodyRepeatable() Determine if the response body is repeatable (readable + seekable) Guzzle\Http\Message\Request
onRequestError() Default method that will throw exceptions if an unsuccessful response is received. Guzzle\Http\Message\Request
removeCacheControlDirective() Guzzle\Http\Message\AbstractMessage
removeCookie() Guzzle\Http\Message\Request
removeHeader() Guzzle\Http\Message\AbstractMessage
removePostField() Guzzle\Http\Message\EntityEnclosingRequest
removePostFile() Guzzle\Http\Message\EntityEnclosingRequest
send() Guzzle\Http\Message\Request
setAuth() Guzzle\Http\Message\Request
setBody() Guzzle\Http\Message\EntityEnclosingRequest
setClient() Guzzle\Http\Message\Request
setEventDispatcher() Guzzle\Http\Message\Request
setExpectHeaderCutoff() Set the size that the entity body of the request must exceed before adding the Expect: 100-Continue header. Guzzle\Http\Message\EntityEnclosingRequest
setHeader() Guzzle\Http\Message\AbstractMessage
setHeaderFactory() Set the header factory to use to create headers Guzzle\Http\Message\AbstractMessage
setHeaders() Guzzle\Http\Message\AbstractMessage
setHost() Guzzle\Http\Message\Request
setIsRedirect() Guzzle\Http\Message\Request
setPath() Guzzle\Http\Message\Request
setPort() Guzzle\Http\Message\Request
setPostField() Guzzle\Http\Message\EntityEnclosingRequest
setProtocolVersion() Guzzle\Http\Message\Request
setResponse() Guzzle\Http\Message\Request
setResponseBody() Guzzle\Http\Message\Request
setScheme() Guzzle\Http\Message\Request
setState() Guzzle\Http\Message\EntityEnclosingRequest
setTokenizedHeader() Guzzle\Http\Message\AbstractMessage
setUrl() Guzzle\Http\Message\Request
startResponse() Guzzle\Http\Message\Request

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getEventArray() Get an array containing the request and response for event notifications Guzzle\Http\Message\Request
processPostFields() Determine what type of request should be sent based on post fields Guzzle\Http\Message\EntityEnclosingRequest
processResponse() Process a received response Guzzle\Http\Message\Request

Property Details

$body protected property

Body of the request

$expectCutoff protected property

When the size of the body is greater than 1MB, then send Expect: 100-Continue

protected int $expectCutoff 1048576
$postFields protected property

POST fields to use in the EntityBody

$postFiles protected property

POST files to send with the request

protected array $postFiles = []

Method Details

__construct() public method

public void __construct ( $method, $url, $headers = [] )
$method
$url
$headers
__toString() public method

public string __toString ( )
addPostFields() public method

public void addPostFields ( $fields )
$fields
addPostFile() public method

public void addPostFile ( $field, $filename null, $contentType null, $postname null )
$field
$filename
$contentType
$postname
addPostFiles() public method

public void addPostFiles ( array $files )
$files
configureRedirects() public method

public void configureRedirects ( $strict false, $maxRedirects 5 )
$strict
$maxRedirects
getBody() public method

public void getBody ( )
getPostField() public method

public void getPostField ( $field )
$field
getPostFields() public method

public void getPostFields ( )
getPostFile() public method

public void getPostFile ( $fieldName )
$fieldName
getPostFiles() public method

public void getPostFiles ( )
processPostFields() protected method

Determine what type of request should be sent based on post fields

protected void processPostFields ( )
removePostField() public method

public void removePostField ( $field )
$field
removePostFile() public method

public void removePostFile ( $fieldName )
$fieldName
setBody() public method

public void setBody ( $body, $contentType null )
$body
$contentType
setExpectHeaderCutoff() public method

Set the size that the entity body of the request must exceed before adding the Expect: 100-Continue header.

public self setExpectHeaderCutoff ( $size )
$size int|bool

Cutoff in bytes. Set to false to never send the expect header (even with non-seekable data)

setPostField() public method

public void setPostField ( $key, $value )
$key
$value
setState() public method

public void setState ( $state, array $context = [] )
$state
$context