| wsgiheaders. Aggiunta e sostituzione delle intestazioni di risposta |
Scarica ora |
wsgiheaders. Classifica e riepilogo
- Licenza:
- MIT/X Consortium Lic...
- Nome editore:
- Atsushi Odagiri
- Sito web dell'editore:
- http://www.bitbucket.org/aodag/
wsgiheaders. Tag
wsgiheaders. Descrizione
Aggiunta e sostituzione delle intestazioni di risposta WsGiheaders è un modulo Python per aggiungere e sostituire le intestazioni di risposta. >>> @replaceheader ()])) ... APP DEF (Ambiente, Start_Response): ... start_response ( '200 ok', ... ) ... ritorno >>> Importa webtest >>> app = webtest.testapp ( App) >>> res = app.Get ('/ A.txt') >>> res.content_type 'testo / plain' >>> res = app.Get ('/ A.html') >>> RES. Content_type 'Text / HTML' >>> DEF XRDS (Environ): ... ritorno + ': //' + Environ + ' /svc.xrds ')]] ... >>> @addheader () ... APP DEF (Ambiente, Start_response): ... start_response (' 200 ok ', ... ) ... ritorno >>> app = webtest.testapp (app) >>> res = app = app .get ('/') >>> res.header 'http: //localhost/svc.xrds' Requisiti: · Python.
wsgiheaders. Software correlato