Skip to content

Instantly share code, notes, and snippets.

@john2x
Created October 23, 2012 09:34
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 john2x/3937891 to your computer and use it in GitHub Desktop.
Save john2x/3937891 to your computer and use it in GitHub Desktop.
SDC Test
import webapp2
from google.appengine.api import urlfetch
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers["Content-Type"] = "text/plain"
self.response.write("John")
app = webapp2.WSGIApplication(
[("/", MainPage)],
debug=True
)
import webapp2
from google.appengine.api import urlfetch
class MainPage(webapp2.RequestHandler):
def get(self):
result = urlfetch.fetch(url="http://mylocalhost.com:8080", headers={"use_intranet": "yes"}, deadline=60)
self.response.headers["Content-Type"] = "text/plain"
self.response.write("Hello, " + result.content)
app = webapp2.WSGIApplication(
[("/", MainPage)],
debug=True
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment