开发者

shopify xml request from GAE python

开发者 https://www.devze.com 2023-01-16 17:54 出处:网络
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.

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消