I'm playing around with some APIs and I'm trying to figure this out.
I am making a basic HTTP authenticated request to my server via the API. As part of this request, the authenticated key is stored in the HTTP header as username.
So my question is, how do I get the contents of the incoming request such that I can perform a check against it?
What I am trying to do:
if incoming request has header == 'myheader':
do some stuff
else:
return ('not authorised')
For those interested, I am trying to get this to work.
UPDATE I am using Django