eZ\Bundle\EzPublishRestBundle\Features\Context\SubContext\EzRest::addObjectToRequestBody PHP Method

addObjectToRequestBody() protected method

Convert an object and add it to the body/content of the request.
protected addObjectToRequestBody ( eZ\Publish\API\Repository\Values\ValueObject $object, string $type )
$object eZ\Publish\API\Repository\Values\ValueObject Object to be converted
$type string Type for the body of the request (XML, JSON)
    protected function addObjectToRequestBody(ValueObject $object, $type)
    {
        $request = $this->convertObjectTo($object, $type);
        $this->restDriver->setBody($request->getContent());
    }