title: redirect_to with HTTP header
body: <p>Not sure if this is possible or makes any sense, but I'm trying to make a redirect after setting a HTTP header field. Something like:</p>
  
  <pre><code>request.headers['Accept'] = 'application/json'
  redirect_to url
  </code></pre>
  
  <p>Obviously this doesn't work, as <code>request</code> is the current request, not the redirect. Is there any way to call <code>redirect_to</code> with custom HTTP headers?</p>