from flask import request
request.headers.get('your-header-name')
request.headers
behaves like a dictionary, so you can also get your header like you would with any dictionary:
request.headers['your-header-name']
More Related Contents:
- How do you send a HEAD HTTP request in Python 2?
- How to encode UTF8 filename for HTTP headers? (Python, Django)
- Python send POST with header
- Using Flask, how do I modify the Cache-Control header for ALL output?
- How to scrape a website that requires login first with Python
- Flask – POST Error 405 Method Not Allowed
- How to send zip files in the python Flask framework?
- how to get access to error message from abort command when using custom error handler
- Python requests.exception.ConnectionError: connection aborted “BadStatusLine”
- How to return a dict as a JSON response from a Flask view?
- How to get POSTed JSON in Flask?
- Handle Flask requests concurrently with threaded=True
- How to specify an authenticated proxy for a python http connection?
- Saving upload in Flask only saves to project root
- How do I set headers using python’s urllib?
- What is the purpose of Flask’s context stacks?
- Multithreaded web server in python
- Best way to parse a URL query string
- Passing a matplotlib figure to HTML (flask)
- How do I set response headers in Flask?
- Restrict static file access to logged in users
- RuntimeError: working outside of application context
- Python requests library how to pass Authorization header with single token
- Extending Flask class as main App
- CSS Problems with Flask Web App
- Python Flask, how to set content type
- Flask URL Route: Route Several URLs to the same function
- Flask(‘application’) versus Flask(__name__)
- How do I run a long-running job in the background in Python
- ModuleNotFoundError: No module named ‘MySQLdb’