Skip to content

Instantly share code, notes, and snippets.

@brianherman
Created September 2, 2011 18:00
Show Gist options
  • Save brianherman/1189316 to your computer and use it in GitHub Desktop.
Save brianherman/1189316 to your computer and use it in GitHub Desktop.
carl_json
import pycurl
def body(buf):
print len(buff)
your_url = "http://pygotham.org/talkvote/full_schedule"
pycurl_connect = pycurl.Curl()
pycurl_connect.setopt(pycurl.URL, your_url)
pycurl_connect.setopt(pycurl.WRITEFUNCTION, body)
pycurl_connect.setopt(pycurl.HTTPHEADER, ['Content-Type:application/json', 'Accept:application/json'])
pycurl_connect.perform()
@brianherman
Copy link
Author

import pycurl
def body(buf):
# buf = carls variable here
your_url = "http://pygotham.org/talkvote/full_schedule"
pycurl_connect = pycurl.Curl()
pycurl_connect.setopt(pycurl.URL, your_url)
c.setopt(pycurl.WRITEFUNCTION, body)
pycurl_connect.setopt(pycurl.HTTPHEADER, ['Content-Type:application/json', 'Accept:application/json'])
pycurl_connect.perform()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment