Class JsonVisitor
Visitor used to apply a parameter to an array that will be serialized as a top level key-value pair in a JSON body
- Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor implements Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface
- Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor
Namespace: Guzzle\Service\Command\LocationVisitor\Request
Located at Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php
Located at Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php
public
|
|
public
|
#
setContentTypeHeader( string $header = 'application/json' )
Set the Content-Type header to add to the request if JSON is added to the body. This visitor does not add a Content-Type header unless you specify one here. |
public
|
#
visit(
Called once for each parameter being visited that matches the location type |
public
|
#
after(
Called after visiting all parameters |
prepareValue(),
resolveRecursively()
|
protected
boolean
|
$jsonContentType | 'application/json' |
#
Whether or not to add a Content-Type header when JSON is found |
protected
|
$data |
|
#
Data object for persisting JSON data |