nl_tokens: 下载 object
pl_tokens: function getObject ( params , callback ) { var reqParams = { } ; reqParams [ 'response-content-type' ] = params [ 'ResponseContentType' ] ; reqParams [ 'response-content-language' ] = params [ 'ResponseContentLanguage' ] ; reqParams [ 'response-expires' ] = params [ 'ResponseExpires' ] ; reqParams [ 'response-cache-control' ] = params [ 'ResponseCacheControl' ] ; reqParams [ 'response-content-disposition' ] = params [ 'ResponseContentDisposition' ] ; reqParams [ 'response-content-encoding' ] = params [ 'ResponseContentEncoding' ] ; // 如果用户自己传入了 output submitRequest . call ( this , { Action : 'name/cos:GetObject' , method : 'GET' , Bucket : params . Bucket , Region : params . Region , Key : params . Key , VersionId : params . VersionId , headers : params . Headers , qs : reqParams , rawBody : true , } , function ( <mask> , data ) { if ( err ) { var statusCode = err . statusCode ; if ( params . Headers [ 'If-Modified-Since' ] && statusCode && statusCode === 304 ) { return callback ( null , { NotModified : true } ) ; } return callback ( err ) ; } var result = { } ; result . Body = data . body ; if ( data . headers && data . headers . etag ) { result . ETag = data . headers && data . headers . etag ; } util . extend ( result , { statusCode : data . statusCode , headers : data . headers , } ) ; callback ( null , result ) ; } ) ; }