HTTP Authentication using urllib2

2009-04-24 Thread Lakshman
I am trying to authenticate using urllib2. The basic authentication works if I hard code authheaders. def is_follows(follower, following): theurl = 'http://twitter.com/friendships/exists.json? user_a='+follower+'&user_b='+following username = 'uname1' password = 'pwd1' handle = ur

HTTP Authentication

2009-04-06 Thread Lakshman
Whats is the python urllib2 equivallent of curl -u username:password status="abcd" http://example.com/update.json I did this: handle = urllib2.Request(url) authheader = "Basic %s" % base64.encodestring('%s:%s' % (username, password)) handle.add_header("Authorization", authheader) Is there a be

Re: Authorize.net integration problem

2009-03-31 Thread Lakshman Prasad
nd string concatenation > in the generation of msg looks unusual to me. > > andrew > > Lakshman wrote: > > I am trying to integrate Authorize.net SIM API into django views. > > > > I am facing a problem in the fingerprint generation. I am repeatedly > > getting

Authorize.net integration problem

2009-03-31 Thread Lakshman
I am trying to integrate Authorize.net SIM API into django views. I am facing a problem in the fingerprint generation. I am repeatedly getting that the fingerprint generated doesn't match the one the server generates. I have generated the md5 hash with the key provided as specified in the SIM doc