Example #1
0
 /**
  * Apply JSON API header to the response.
  *
  * @param  Symfony\Component\HttpFoundation\Response $response [description]
  * @return Symfony\Component\HttpFoundation\Response
  */
 protected function applyHeaders(Response $response)
 {
     return $response->header('Content-Type', self::CONTENT_TYPE, true);
 }
Example #2
0
 /**
  * Adds the JSON-API Content Type header to the current Response
  *
  * @param Response $response
  * @return mixed
  */
 protected function addHeader(Response $response)
 {
     return $response->header('Content-Type', 'application/vnd.api+json', true);
 }
Example #3
0
 protected function processResponse(ProfileRequest $profiler, Response $response)
 {
     $profiler->recordQueries();
     Cache::put('profiler-request-' . $profiler->getId(), $profiler->toString(), 2);
     return $response->header('X-Request-Id', $profiler->getId());
 }