Is there an equivalent option to curl's -d option for pycurl? What I want to do is specify multiple parameters in the URL for instance this does not work:

USER = aurawind2k
PASS = XXX

STREAM_URL = "http://status.dummy.com/status.json?userId=12&page=1"
class Client:	
          def __init__(self):
		self.buffer = ""
		self.conn = pycurl.Curl()
		self.conn.setopt(pycurl.USERPWD, "%s:%s" % (USER,PASS))
		self.conn.setopt(pycurl.URL, STREAM_URL)
		self.conn.setopt(pycurl.WRITEFUNCTION, self.on_receive)
		self.conn.perform()
				
	def on_receive(self,data):
		self.buffer += data

Am I supposed to URL encode the parameters?

Thanks,
Rob

Do you have a stack trace of it failing?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.