How do i access the http headers of the request that calls this method?
class GetDBVersion(webapp2.RequestHandler):
def get(self):
# writes out db version
in main.py
app = webapp2.WSGIApplication([
('/version', GetDBVersion
# and more methods
Do this inside the class with webapp2.RequestHandler.
self.request.headers
It will give you a dict of headers.
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