view examples/tutorial/geddit/lib/ajax.py @ 729:be0b4a7b2fd4 trunk

* Add XHTML 1.1 doctype (closes #228). * Add option to include the XML decl in the output when serializing to XHTML.
author cmlenz
date Sat, 31 May 2008 20:48:43 +0000
parents abad7c2ebe15
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'
Copyright (C) 2012-2017 Edgewall Software