I look after many links to find how can I define my proprietary header in webpy. Can you help me, please. I need to define my own http header like ("X-UploadedFile") and then use it with web.input()
1 Answer
Headers aren't part of web.input(), they're part of the "environment".
You can add headers, to be sent to your client using web.header('My-Header', 'header-value').
You can read headers sent by your client using: web.ctx.env.get('MY_HEADER') (Note all-caps, and use of underline rather than dash).