- Mobile 2.0 Europe Conference – July 4 Barcelona
- Oliver Letwin Questions 10p Tax and Electoral Law – The Scottish Sketch
- The Tao of Mac – Using vim as a Python IDE
Taken from Jim’s del.icio.us links
Taken from Jim’s del.icio.us links
Taken from Jim’s del.icio.us links
Taken from Jim’s del.icio.us links
Taken from Jim’s del.icio.us links
Taken from Jim’s del.icio.us links
I needed to do a simple http get in the other day, the only catch was that I had to send a cookie. My first thoughts were that this might be tricky, but in practise it's a doddle. Below is a simplistic example passing a cookie (called "Fish", with a value of "Cod") using Python's httplib.
import httplib
conn = httplib.HTTPConnection( "www.example.com" )
Headers = {"Cookie" : "Fish=Cod"}
conn.request("GET", "/fishfinder.html", None, Headers )
response = conn.getresponse()
data = response.read()
How hard can it be?