Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Gregory Piñero
Thanks for all the help guys, it finally worked! I don't know if I ever would have figured this out on my own... skipping the url encoding is what did the trick. I didn't end up needing to do anything special for ssl. I guess urllib2 just handles that itself. Thanks again, -Greg -- http://ma

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Never Code Faster Than You Can See
Gregory Piñero wrote: > Ok, I tried the changes you guys suggested but same error still: > 1. Corrected spelling of referrer. errr, the other chap said the INcorrect spelling is correct for http. sorry about that. > Here is what they say my request should look like: > ---

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Fredrik Lundh
Gregory Piñero wrote: > 1 . One thing that is weird is that the data part just says "Your > FedEx Transaction". I know I put the XML here, but I also notice that > urllib2 is putting this as: > > request= > Can I have my xml placed here without that something= part? That > don't specify what par

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Eric Nieuwland
Don't forget to substitute the actual Content-length for %d! --eric On 1 feb 2006, at 17:34, Gregory Piñero wrote: > Correction: > --- > -- > POST /GatewayDC HTTP/1.0 > Referer: YourCompanyNameGoesHere > Host: SSLserver.fedex.c

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread David Wahler
Gregory Piñero wrote: > Ok, I tried the changes you guys suggested but same error still: > 1. Corrected spelling of referrer. > 2. Don't specify host. > > Here is what they say my request should look like: > - > POST /GatewayDC

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Gregory Piñero
Correction: - POST /GatewayDC HTTP/1.0 Referer: YourCompanyNameGoesHere Host: SSLserver.fedex.com Accept: image/gif, image/jpeg, image/pjpeg, text/plain, text/html, */* Content-Type: image/gif Content-length: %d Your FedEx Tra

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Gregory Piñero
Ok, I tried the changes you guys suggested but same error still: 1. Corrected spelling of referrer. 2. Don't specify host. Here is what they say my request should look like: - POST /GatewayDC HTTP/1.0 Referer: YourCompanyNameG

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Fuzzyman
That would certainly be an error. *Also*, urllib2 adds the host header for you, no need to set it. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Eric Nieuwland
Hi Greg, > values = {'request':xml_request} > headers = { 'Referer' : 'YourCompany', > 'Host':'https://gatewaybeta.fedex.com/GatewayDC', > 'Accept':'image/gif, image/jpeg, image/pjpeg, text/plain, > text/html, */*', > 'Content-Type':'image/gif' > }

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Don't Code Faster Than You Can See
(blogger.com gives the same error if you don't .strip() your password before using it to connect) i noticed one spelling mistake here: > headers = { 'Referer' : 'YourCompany', 'Referrer' could it be that simple? -- http://mail.python.org/mailman/listinfo/python-list

urllib2 - My POST Request just isn't working right

2006-02-01 Thread Gregory Piñero
Hi guys, I'm trying to write a program to get FedEx shipping rates, and I'm following their API as outlined in this document: http://www.fedex.com/us/solutions/wis/pdf/fsm_directmanual.pdf I need specifically to make a POST request to their server as shown on page 12. However I continually get s