Mercurial > genshi > genshi-test
view examples/tutorial/geddit/lib/ajax.py @ 777:4ca0e1e43ce0 stable-0.5.x
Ported [899:902] to 0.5.x branch.
author | cmlenz |
---|---|
date | Tue, 08 Jul 2008 20:41:26 +0000 |
parents | dba522b4c31d |
children |
line wrap: on
line source
import cherrypy def is_xhr(): requested_with = cherrypy.request.headers.get('X-Requested-With') return requested_with and requested_with.lower() == 'xmlhttprequest'