wsgiheadersAdding and replacing response headers | |
Download |
wsgiheaders Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Atsushi Odagiri
- Publisher web site:
- http://www.bitbucket.org/aodag/
wsgiheaders Tags
wsgiheaders Description
Adding and replacing response headers wsgiheaders is a Python module for adding and replacing response headers. >>> @replaceheader()]) ... def app(environ, start_response): ... start_response('200 OK', ... ) ... return >>> import webtest >>> app = webtest.TestApp(app) >>> res = app.get('/a.txt') >>> res.content_type 'text/plain' >>> res = app.get('/a.html') >>> res.content_type 'text/html' >>> def xrds(environ): ... return + '://' +environ + '/svc.xrds')] ... >>> @addheader() ... def app(environ, start_response): ... start_response('200 OK', ... ) ... return >>> app = webtest.TestApp(app) >>> res = app.get('/') >>> res.headers 'http://localhost/svc.xrds' Requirements: · Python
wsgiheaders Related Software