Re: fetch image
asit wrote: > import httplib > > class Server: > #server class > def __init__(self, host): > self.host = host > def fetch(self, path): > http = httplib.HTTPConnection(self.host) > http.request("GET", path) > r = http.getresponse() > print str(r.
fetch image
import httplib class Server: #server class def __init__(self, host): self.host = host def fetch(self, path): http = httplib.HTTPConnection(self.host) http.request("GET", path) r = http.getresponse() print str(r.status) + " : " + r.reason serve