access to http headers within services code

Asked by Mr T on 2013-07-02

We've been developing some web services in python.

Right now we're using spyne. But we are thinking on moving to ladon, because it can use python types as input/outputs.
(we are intending to use a software call taverna as the client GUI for accessing the web services and the interaction is clearer with simple types)

We are using the HTTP headers to get the name of the user (we provide the web services using HTTP Basic Auth). Spyne let us use a "context" variable, that holds all the HTTP headers when a call is made. Is there any way we can access them using Ladon????

Question information

English Edit question
ladon Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best jsgaarde (jakob-simon-gaarde) said : #1

Hi Mr T.

Of course you can access the headers. In fact you can access all WSGI variables for every request. see here:

Best regards Jakob Simon-Gaarde

Mr T (mrjaspe) said : #2

Thanks jsgaarde, that solved my question.