Util-Chain and PHP-Sandbox (Custom Headers)
vincenzo84 opened this issue · comments
Vincenzo commented
In a PHP-Sandbox action that is called within a Util-Chain, how do I add a header that is available in all responses in the chain?
Thank you
Vincenzo commented
Found it, just add this:
$requestContext = $request->getContext();
$httpRequest = $requestContext->getRequest();
$headers = $httpRequest->getHeaders();
$httpRequest->addHeader('key', 'value');
Thank you