语言

Attachments.GetAttachmentWithHttpMessagesAsync 方法

定义

GetAttachment。

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.IO.Stream>> GetAttachmentWithHttpMessagesAsync(string attachmentId, string viewId, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAttachmentWithHttpMessagesAsync : string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.IO.Stream>>
override this.GetAttachmentWithHttpMessagesAsync : string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<System.IO.Stream>>
Public Function GetAttachmentWithHttpMessagesAsync (attachmentId As String, viewId As String, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of Stream))

参数

attachmentId
String

附件ID。

viewId
String

查看附件信息中的ID。

customHeaders
Dictionary<String,List<String>>

请求时会添加的头部。

cancellationToken
CancellationToken

取消令牌。

返回

Task<Microsoft.Rest.HttpOperationResponse<Stream>>

包含响应体和响应头部的响应对象。

实现

例外

当操作返回无效状态码时,会被抛出。

Microsoft.Rest.SerializationException

当无法反序列化响应时被抛弃。

Microsoft.Rest.ValidationException

当输入值与预期的数据类型、范围或数据字段模式不匹配时,会被抛出。

当所需参数为空时,会被抛出。

注解

以二进制内容的形式获取命名视图。

适用于