Help with a HTTP GET request

Carbon-based paul.hemans at gmail.com
Wed May 13 00:15:20 EDT 2009


Great, thank you very much.

On May 13, 1:38 pm, Tim Harig <user... at ilthio.net> wrote:
> On 2009-05-13, Tim Harig <user... at ilthio.net> wrote:
>
> > host = "http://localhost"
> > request = r"""/common/foxisapi.dll/tmsmail.x2.isapi?<PROCESS sync='' schema='' class='replicateApplication.getChanges' /"""
> > url = host + urllib.quote(request)
> > content = urllib.urlopen(url).read()
>
> Which accidentally encodes the '?' separator.  Third times a charm:
> host = "http://localhost"
> script = "/common/foxisapi.dll/tmsmail.x2.isapi"
> getData = r"""<PROCESS sync='' schema='' class='replicateApplication.getChanges' /"""
> url = host + script + '?' + urllib.quote(getData)
> content = urllib.urlopen(url).read()




More information about the Python-list mailing list