xmlrpc, extract data from http headers

Filip Wasilewski filipwasilewski at gmail.com
Fri Sep 15 19:51:54 EDT 2006


Milos Prudek wrote:
> I perform a XML-RPC call by calling xmlrpclibBasicAuth which in turn calls
> xmlrpclib. This call of course sends a HTTP request with correct HTTP
> headers. The response is correctly parsed by xmlrpclib, and I get my desired
> values.
>
> However, I also need to get the raw HTTP headers from the HTTP response. There
> is a cookie in the HTTP response and I need to read that cookie.
>
> How could I do that?

Overload the _parse_response method of Transport in your
BasicAuthTransport and extract headers from raw response. See the
source of xmlrpclib.py in the standard library for details.

cheers,
fw




More information about the Python-list mailing list