Is it possible to send a response from a service, but return something else? I have a block that returns a render array. I would also like to set a cookie value as well in this process. Is it possible to set a cookie and also return a render array?
You can still use setcookie/setrawcookie in Drupal, if you are sending a response, you can use Symfony to set one:

$cookie = new Cookie('name', 'value', $expire, '/', 'domain', TRUE, TRUE, TRUE);
$response-&gt;headers-&gt;setCookie($cookie);


vs

setrawcookie('name', 'value', $expire, '/', 'domain', TRUE, TRUE);


Note that the internal Drupal function that writes a cookie adds a prefix that you probably don't want.