2

I know that, with web.ctx.env, I can get a lot of information that comes from the headers -- but only the standard headers. Is it possible to obtain all HTTP request headers from within a GET or POST method in web.py?

1 Answer 1

5

Are you sure that it has only standard headers? Cos I'm using it to check web.ctx.env.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' which is not in the list on that page. I also get values of HTTP_X_FILE_NAME and HTTP_X_FILE_TYPE headers that I set in xhr like this: xhr.setRequestHeader( "X-File-Type", file.type );.

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.