How do I read the contents of a file on Google Clo

2019-08-12 16:31发布

问题:

How do I read the contents of a file on Google Cloud Storage using javascript.

I tried this and it gets me the metadata but I can't figure out how to read the content of a file. Any help is appreciated, thanks.

$wnd.gapi.client.request({
           path : '/storage/v1beta1/b/easycompile/o/steps.txt',
           method : 'GET',
           params : {
                projection: "FULL"
           }
      });
      request.execute(function(response) {
           console.log(response);   
      });