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 src/Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php
Located at src/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(
|
public
|
#
after(
|
prepareValue(),
resolveRecursively()
|
protected
boolean
|
$jsonContentType
Whether or not to add a Content-Type header when JSON is found |
#
'application/json'
|
protected
|
$data
Data object for persisting JSON data |