view examples/tutorial/geddit/lib/ajax.py @ 1045:d7ede0cf4735 stable-0.6.x tip

Merge r1269 from trunk (fix for selecting namespaced attributes).
author hodgestar
date Thu, 20 Mar 2014 13:01:56 +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