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

Discussion in 'Python' started by Gabriel Genellina, Aug 19, 2006.

  1. 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
     
    Gabriel Genellina, Aug 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Shannon
    Replies:
    4
    Views:
    1,046
    Wade Leftwich
    Jul 21, 2004
  2. Nelson Minar

    multipart/form-data in an HTTP client

    Nelson Minar, Sep 1, 2004, in forum: Python
    Replies:
    5
    Views:
    5,755
    Jeff Shannon
    Sep 2, 2004
  3. Ames Andreas (MPA/DF)

    Re: multipart/form-data in an HTTP client

    Ames Andreas (MPA/DF), Sep 2, 2004, in forum: Python
    Replies:
    1
    Views:
    485
    Jeff Shannon
    Sep 2, 2004
  4. Bruno Dilly
    Replies:
    0
    Views:
    449
    Bruno Dilly
    Aug 18, 2006
  5. leoboiko
    Replies:
    0
    Views:
    396
    leoboiko
    Aug 6, 2008
Loading...

Share This Page