NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class BodyVisitor

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.

  Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor implements Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface
  Guzzle\Service\Command\LocationVisitor\Request\BodyVisitor

Namespace: Guzzle\Service\Command\LocationVisitor\Request
Located at Guzzle/Service/Command/LocationVisitor/Request/BodyVisitor.php

## Methods summary

- `public` `visit ( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Description\Parameter $param, mixed $value )`
- `protected` `addExpectHeader ( Guzzle\Http\Message\EntityEnclosingRequestInterface $request, Guzzle\Http\EntityBodyInterface $body, string|int $expect )`

  Add the appropriate expect header to a request

## Methods detail

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

#### Parameters

$command
  ``Guzzle\Service\Command\CommandInterface``
  $command Command being visited
$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request being visited
$param
  ``Guzzle\Service\Description\Parameter``
  $param Parameter being visited
$value
  `mixed`
  $value Value to set

#### CodeCoverageIgnore

#### Overrides

`Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::visit`
# `protected`
`addExpectHeader( `Guzzle\Http\Message\EntityEnclosingRequestInterface` $request, `Guzzle\Http\EntityBodyInterface` $body, string|integer $expect )`

Add the appropriate expect header to a request

#### Parameters

$request
  ``Guzzle\Http\Message\EntityEnclosingRequestInterface``
  $request Request to update
$body
  ``Guzzle\Http\EntityBodyInterface``
  $body Entity body of the request
$expect
  `string|integer`
  $expect Expect header setting

### Methods inherited from Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor

`after()`, `prepareValue()`, `resolveRecursively()`

### Magic methods summary