Request
utility methods / properties
#966
provinzkraut
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While working on the migration guide from Flask, I made a comparison table for request methods and wanted to put this out there to see if we might also want to add some of those for convenience. Specifically the headers like
Range
andif-match
are parsed into their own datastructures, which can be helpful.request.cache_control
request.headers.get("cache-control")
request.content_encoding
request.headers.get("content-encoding")
request.content_length
request.headers.get("content-length")
request.content_md5
request.date
request.headers.get("date")
request.host
request.host_url
request.if_match
request.headers.get("if-match")
request.if_modified_since
request.headers.get("if_modified_since")
request.if_none_match
request.headers.get("if_none_match")
request.if_range
request.headers.get("if_range")
request.if_unmodified_since
request.headers.get("if_unmodified_since")
request.mimetype
request.mimetype_params
request.origin
request.range
request.headers.get("range")
request.referrer
request.headers.get("referrer")
request.remote_addr
request.remote_user
request.user_agent
request.headers.get("user-agent")
Beta Was this translation helpful? Give feedback.
All reactions