Class Guzzle\Service\Command\LocationVisitor\Request\BodyVisitor

InheritanceGuzzle\Service\Command\LocationVisitor\Request\BodyVisitor » Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor
ImplementsGuzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface

Visitor used to apply a body to a request

This visitor can use a data parameter of 'expect' to control the Expect header. Set the expect data parameter to false to disable the expect header, or set the value to an integer so that the expect 100-continue header is only added if the Content-Length of the entity body is greater than the value.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
addExpectHeader() Add the appropriate expect header to a request Guzzle\Service\Command\LocationVisitor\Request\BodyVisitor
prepareValue() Prepare (filter and set desired name for request item) the value for request. Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor
resolveRecursively() Map nested parameters into the location_key based parameters Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor

Method Details

addExpectHeader() protected method

Add the appropriate expect header to a request

protected void addExpectHeader ( Guzzle\Http\Message\EntityEnclosingRequestInterface $request, Guzzle\Http\EntityBodyInterface $body, $expect )
$request Guzzle\Http\Message\EntityEnclosingRequestInterface

Request to update

$body Guzzle\Http\EntityBodyInterface

Entity body of the request

$expect string|int

Expect header setting

visit() public method

public void visit ( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Description\Parameter $param, $value )
$command
$request
$param
$value