In the endpoints method, how to access request header information?
Python:
In the endpoint method, self.request_state.headers provides this information.
E.g., self.request_state.headers.get('authorization')
Java:
Add an HttpServletRequest (req) parameter to your endpoint method. The headers are accessible through the method getHeader()
e.g., req.getHeader("Authorization")
See this question
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With