def get(self):
# [START urlfetch-post]
try:
form_data = urllib.urlencode(UrlPostHandler.form_fields)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
result = urlfetch.fetch(
url='http://localhost:8080/submit_form',
payload=form_data,
method=urlfetch.POST,
headers=headers)
self.response.write(result.content)
except urlfetch.Error:
logging.exception('Caught exception fetching url')
# [END urlfetch-post]
评论列表
文章目录