log_debug(DBG.HTTP_FULL, 'requesting: ' + str(mime))
hh = { 'User-Agent': ['hippotat'],
- 'Content-Type': ['multipart/form-data; boundary="b"']
-# , 'Content-Length': [str(len(mime))]
- }
+ 'Content-Type': ['multipart/form-data; boundary="b"'],
+ 'Content-Length': [str(len(mime))] }
bytesreader = io.BytesIO(mime)
producer = twisted.web.client.FileBodyProducer(bytesreader)
req = agent.request(b'POST',
c.url,
- twisted.web.client.Headers(hh)
-# , producer
- )
+ twisted.web.client.Headers(hh),
+ producer)
log_debug(DBG.HTTP_CTRL, 'request', idof=req, d=d)
req.addTimeout(c.http_timeout, reactor)