[web-devel] Getting the http request header in Yesod?

Michael Snoyman michael at snoyman.com
Sun Sep 26 12:20:15 CEST 2010

On Sun, Sep 26, 2010 at 10:10 AM, Rehno Lindeque <errantkid at gmail.com> wrote:

> One more question. Is it possible to manipulate the request header
> when doing a redirect? For example, at one I have (redirect
> RedirectTemporary $ AuthR LoginR), but "X-Requested-With" isn't being
> passed through...

No, the request headers are set by the browser, and you can't directly
affect them. What you *could* do is set a session variable or
something. However, your best bet is probably to redirect to a URL
with a query-string parameter indicated the request-with information
and then check both the request header and the query string parameter.


More information about the web-devel mailing list