protected setRestBodyType ( string $type ) | ||
$type | string | Type of the REST body |
protected function setRestBodyType($type)
{
$type = strtolower($type);
switch ($type) {
case 'json':
case 'xml':
$this->restBodyType = $type;
break;
default:
throw new \Exception("REST body type '{$type}' not suported");
}
}