OCISDK/OCISDK/ObjectStorage/ObjectStorageClientAsync.cs
/// <summary>
/// Lists the parts of an in-progress multipart upload.
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Lists the parts of an in-progress multipart upload.
Lists the parts of an in - progress multipart upload .
public async Task<ListMultipartUploadPartsResponse> ListMultipartUploadParts(ListMultipartUploadPartsRequest request)
        {
            var uri = new Uri($"{GetEndPointNoneVersion(ObjectStorageServices.Bucket(request.NamespaceName, request.BucketName), this.Region)}/u/{request.ObjectName}?{request.GetOptionQuery()}");
            using (var webResponse = await this.RestClientAsync.Get(uri, new HttpRequestHeaderParam { OpcClientRequestId = request.OpcClientRequestId }))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListMultipartUploadPartsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<MultipartUploadPartSummary>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcClientRequestId = webResponse.Headers.Get("opc-client-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public async Task < ListMultipartUploadPartsResponse > ListMultipartUploadParts ( ListMultipartUploadPartsRequest request ) { var uri = new Uri ( $" { GetEndPointNoneVersion ( ObjectStorageServices . Bucket ( request . NamespaceName , request . BucketName ) , this . Region ) } /u/ { request . ObjectName } ? { request . GetOptionQuery ( ) } " ) ; using ( var webResponse = await this . RestClientAsync . Get ( uri , new HttpRequestHeaderParam { OpcClientRequestId = request . OpcClientRequestId } ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListMultipartUploadPartsResponse ( ) { Items = JsonSerializer . Deserialize < List < MultipartUploadPartSummary > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcClientRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists the parts of an in-progress multipart upload.
Lists the parts of an in - progress multipart upload .
None
request
ListMultipartUploadPartsRequest
None