def upload(self, oauth_token, bucket, object_name, payload,
             content_type='text/plain'):
    # TODO(kbrisbin): This hasn't been tested yet.
    url = '%s/%s/%s' % (BASE_URL, bucket, object_name)
    date = datetime.datetime.now()
    str_date = date.strftime('%b %d, %Y %H:%M:%S')
    result = urlfetch.fetch(
        url=url, payload=payload, method=urlfetch.PUT,
        headers={
            'Authorization': 'OAuth %s' % (oauth_token),
            'Date': str_date,
            'x-goog-project-id': self.project_id,
            'x-goog-api-version': API_VERSION,
            'Content-Type': content_type})
    return result.content
Overridden to execute TNonblockingServer's main loop
dataset/ETHPy150Open googlearchive/compute-appengine-demo-suite-python/demo-suite/lib/google_cloud/cs.py/Cs.upload--crossover with--dataset/ETHPy150Open facebook/sparts/sparts/tasks/thrift/cppserver.py/CPPServerTask._runloop