protected function buildJsonpResponse(Response $response) {
		$content     = (string)$response->getBody();
		$contentType = $response->getHeaderLine('Content-Type');

		if (strpos($contentType, 'application/json') === false) {
			$content = '"' . $content . '"';
		}

		$callback = "{$this->callbackName}({$content});";

		$newResponse = new Response(200);
		$newResponse->getBody()->write($callback);

		return $newResponse->withHeader('Content-Type', 'application/javascript');
	}