All this method of the Rails' request class does is to check whether
the request is "ajaxian" ('xhr' is a common acronym for
XMLHttpRequest). It's handy for rendering responses.
Of course, the generic paste request class must not have it, as the
method relies on ptototype's sending the corresponding header. However,
Pylons uses prototype, therefore such a feature could be used here.

Philip Jenvey wrote:
> On Jul 19, 2006, at 1:50 AM, iGL wrote:
>
> >
> > Hi,
> > Does paste.WSGIRequest have something equivalent of Rails' request's
> > 'xhr?' attribute? And if not, maybe, once webhelpers are linked with
> > prototype anyway, the Pylons' version of WSGIRequest should have one?
> > Its implementation is trivial, as ptototype sends "X-Requested-With"
> > header along with each ajax request.
> >
>
> You can check for any header in the environ dict:
> request.environ.has_key('X-Requested-With'). Is that what you're
> looking for?
> 
> What does Rail's xhr attribute do?
> 
> --
> Philip Jenvey


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to