[Fedora-suds-list] setting cookies in soap headers

Mohamed Lrhazi lrhazi at gmail.com
Sun Mar 15 00:57:39 UTC 2009


No,  rather:

myclient = suds.Client(url, headers= { 'Cookie': 'ASP.NET_SessionId=value'})

replace value with whatever you need, like:

value=123456
myclient = suds.Client(url, headers= { 'Cookie': 'ASP.NET_SessionId=%s'%value})


On Sat, Mar 14, 2009 at 7:55 PM, Mohamed Lrhazi <lrhazi at gmail.com> wrote:
> I would try:
>
> myclient = suds.Client(url, headers= { Set-Cookie': 'ASP.NET_SessionId=value'})
>
> HTH,
> Mohamed.
>
> On Sat, Mar 14, 2009 at 4:34 PM, David Bunch <david.e.bunch at gmail.com> wrote:
>> yeah I figured that much, but i've been reading the documentation and i dont
>> know how I would set the cookie.  I know when you initialize a client you
>> would do myclient = suds.Client(url, options)  and options is an argument
>> dictionary, but what is the format of setting a cookie?  how do I set it in
>> options?
>>
>> On Fri, Mar 13, 2009 at 9:38 PM, Mohamed Lrhazi <lrhazi at gmail.com> wrote:
>>>
>>> I think you need to use the headers option to the suds.client constructor:
>>>
>>> headers
>>>    Provides for extra http headers.
>>>
>>>
>>>
>>> On Fri, Mar 13, 2009 at 9:01 PM, David Bunch <david.e.bunch at gmail.com>
>>> wrote:
>>> > Hi,
>>> >
>>> > How do you add a cookie to suds soap request headers?  I need to set a
>>> > cookie called ASP.NET_SessionId.
>>> > I read the section on soap headers, but I'm not sure if that applies to
>>> > what
>>> > im trying to do.
>>> >
>>> > Thanks,
>>> > -David
>>> >
>>> > _______________________________________________
>>> > fedora-suds-list mailing list
>>> > fedora-suds-list at redhat.com
>>> > https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>> >
>>>
>>>
>>>
>>> --
>>> " Logic merely sanctions the conquests of the intuition."
>>> Jacques Hadamard
>>
>>
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>
>
>
>
> --
> " Logic merely sanctions the conquests of the intuition."
> Jacques Hadamard
>



-- 
" Logic merely sanctions the conquests of the intuition."
Jacques Hadamard




More information about the fedora-suds-list mailing list