| WSGIHEADERS. Adicionando e substituindo cabeçalhos de resposta |
Baixe Agora |
WSGIHEADERS. Classificação e resumo
- Licença:
- MIT/X Consortium Lic...
- Nome do editor:
- Atsushi Odagiri
- Site do editor:
- http://www.bitbucket.org/aodag/
WSGIHEADERS. Tag
WSGIHEADERS. Descrição
Adicionando e substituindo cabeçalhos de resposta O WSGIHEADERS é um módulo Python para adicionar e substituir cabeçalhos de resposta. >>> @replaceheader () ... DEF App (Environ, Start_Response (Environ, Start_Response): ... start_response (start_response '200 ok', ... ) ... retorne >>> Import webtest >>> app = webtest.testApp ( app) >>> res = app.get ('/ a.txt') >>> res.content_type 'text / planície' >>> res = app.get ('/ a.html') >>> res. content_type 'text / html' >>> def xrds (ambiental): ... retorne + ': //' + ambiental + ' /svc.xrds ')] ... >>> @addheader ( ... DEF App (Environ, Start_Response): ... start_response (' 200 ok ', ... ) ... retorne >>> app = webtest.testapp (app) >>> res = app .get ('/') >>> res.Headers 'http: //localhost/svc.xrds' requisitos: · Pitão
WSGIHEADERS. Software Relacionado