public function getContentType() { return $this->content_type; }
public function getEncodedData() { $data = $this->getData(); if (in_array($this->object->getContentType(), ['application/json', 'text/json'])) { return json_encode($data); } return rawurlencode($data); }