Skip to content

Instantly share code, notes, and snippets.

@ecarnevale
Created October 15, 2008 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecarnevale/16832 to your computer and use it in GitHub Desktop.
Save ecarnevale/16832 to your computer and use it in GitHub Desktop.
class Image(webapp.RequestHandler):
def get(self):
url = "http://api.thumbalizr.com/?url=http://www.ford.de&width=250"
response = urlfetch.fetch(url)
if response.status_code == 200:
self.response.headers['Content-Type'] = "image/jpg"
self.response.out.write(response.content)
else:
self.error(404)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment