Add better support for processing headers and other components from an HTTP request
Is your feature request related to a problem? Please describe.
Need access to http headers inside of an endpoint or collector.
Right now the best / only way to do this is to have your endpoint processor take in a startlette Request then you get access to everything. This is needed to do things like auth checks and what not
Describe the solution you'd like
We use FastAPI as our container wrapper so ideally we could model it something like: https://fastapi.tiangolo.com/tutorial/header-params/
Describe alternatives you've considered
The best / only way to do this is to have your endpoint processor take in a startlette Request then you get access to everything.
Something like:
@app.endpoint(...)
def my_endpoint(request: startlette.Request):
request.headers['content-type']
but with this approach you loose out on the automatic type checking for requests.