/** * 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); }
/** * 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); }
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()); }