Created
October 23, 2012 09:34
-
-
Save john2x/3937891 to your computer and use it in GitHub Desktop.
SDC Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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