Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Http client to POST using multipart/form-data

Reply
Thread Tools

Re: Http client to POST using multipart/form-data

 
 
Gabriel Genellina
Guest
Posts: n/a
 
      08-19-2006
At Friday 18/8/2006 03:06, Bruno Dilly wrote:

>I'm implementing a http client to POST using multipart/form-data. It
>uses urllib2 module, and files are uploaded correctly.
>
>But I need to know how much has been uploaded at a given moment, to
>inform the user the proportion of the file already uploaded.


See httplib.HTTPConnection._send_request; after sending the headers:
if body:
self.send(body)
You should inherit from HTTPConnection and provide your feedback
there - that depends on your application.
Then, inherit from urllib2.HTTPHandler, and override http_open to use
your custom HTTPConnection.
Pass your custom HTTPHandler to build_opener and it will use it.



Gabriel Genellina
Softlab SRL





__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Http client to POST using multipart/form-data Bruno Dilly Python 0 08-18-2006 06:06 AM
Why getInputStream in a http servlet request isn't getting the datasent by browser HTTP POST action? James Java 3 11-25-2005 11:17 PM
HTTP GET vs HTTP POST protocol serge calderara ASP .Net Web Services 1 11-04-2005 01:27 PM
How to enter to .aspx page by http connection using http POST request farazkazmi@gmail.com Java 6 08-29-2005 02:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57