Example #1
0
 /**
  * Get a router configured response with:
  * - content serialize
  * - success status code
  * - header Content-Type
  * - header Location.
  *
  * @param bool $autoSerializeContent
  *
  * @return mixed
  */
 public function getRouterResponse($autoSerializeContent = true)
 {
     $content = $this->getContent();
     if ($autoSerializeContent) {
         $content = $this->serialize($content, $this->getFormat());
     }
     return $this->router->getResponse($content, $this->getConfiguredHeaderstatusCode(), $this->getConfiguredHeaders());
 }
Example #2
0
 protected function hintHTTPPayloadBody($hintedPayloadBody)
 {
     $this->router->setPayloadBodyValue($hintedPayloadBody);
 }