aschmid00
aschmid00

Reputation: 7158

shopify xml request from GAE python

I'm trying to make requests to the shopify.com API over GAE python the url i have to request is not formed in the usual format.

it is composed like http://apikey:password@hostname/admin/resource.xml

with urllib I can request it but i cant set the headers for an xml request so it doesn't work.

urllib2, httplib... are having problems with the ':'.

I get either a 'nodename nor servname provided, or not known' or a 'nonnumeric port' because it expects a port number after the semicolon.

any help?

Upvotes: 1

Views: 263

Answers (1)

Will McCutchen
Will McCutchen

Reputation: 13117

Look into how to do HTTP Basic authentication in Python. See especially the section on Doing it Properly.

Upvotes: 2

Related Questions