Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created June 11, 2012 18:28
Show Gist options
  • Select an option

  • Save jan-matejka/2911779 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/2911779 to your computer and use it in GitHub Desktop.
btr wtf?
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from httplib import HTTPConnection as C
def do_shit():
c = C('www.google.com')
c.request("GET", "/")
r = c.getresponse()
data = r.read()
return r, data
r,d = do_shit()
print "response: %s" % r
print "data: %s" % d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment