Skip to content

Instantly share code, notes, and snippets.

Working from home

Kasun Thennakoon tmkasun

Working from home
View GitHub Profile
lukemarsden /
Created Feb 27, 2011
Simple function to do an HTTP POST using Twisted Agent
from twisted.web.iweb import IBodyProducer
from twisted.internet import defer
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
import urllib
class StringProducer(object):
def __init__(self, body):