Python – Hit a URL on other server from google app engine

google-app-enginepythonurl

I want to hit a URL from python in google app engine. Can any one please tell me how can i hit the URL using python in google app engine.

Best Solution

You can use the URLFetch API

from google.appengine.api import urlfetch

url = "http://www.google.com/"
result = urlfetch.fetch(url)
if result.status_code == 200:
  doSomethingWithResult(result.content)