1

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 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.