你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IMobileServiceClient.InvokeApiAsync 方法

定义

重载

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken)

使用指定的 HttpMethod 调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>)

使用指定的 HttpMethod 调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync(String, JToken, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

InvokeApiAsync(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync(String, JToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

InvokeApiAsync(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync(String, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync<T,U>(String, T)

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync<T,U>(String, T, CancellationToken)

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

InvokeApiAsync<T>(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync<T>(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken)

使用指定的 HttpMethod 调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> InvokeApiAsync (string apiName, System.Net.Http.HttpContent content, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> requestHeaders, System.Collections.Generic.IDictionary<string,string> parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * System.Net.Http.HttpContent * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function InvokeApiAsync (apiName As String, content As HttpContent, method As HttpMethod, requestHeaders As IDictionary(Of String, String), parameters As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpResponseMessage)

参数

apiName
String

自定义 API 的名称。

content
HttpContent

HTTP 内容。

method
HttpMethod

HTTP 方法。

requestHeaders
IDictionary<String,String>

要在 HttpRequest 中包括的用户定义的标头的字典。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

来自自定义 api 调用的 HTTP 响应。

适用于

InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, Newtonsoft.Json.Linq.JToken body, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * Newtonsoft.Json.Linq.JToken * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, body As JToken, method As HttpMethod, parameters As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

body
Newtonsoft.Json.Linq.JToken

要作为 HTTP 正文发送的值。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<Newtonsoft.Json.Linq.JToken>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, method As HttpMethod, parameters As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<Newtonsoft.Json.Linq.JToken>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, Newtonsoft.Json.Linq.JToken body, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters);
abstract member InvokeApiAsync : string * Newtonsoft.Json.Linq.JToken * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, body As JToken, method As HttpMethod, parameters As IDictionary(Of String, String)) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

body
Newtonsoft.Json.Linq.JToken

要作为 HTTP 正文发送的值。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

返回

Task<Newtonsoft.Json.Linq.JToken>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>)

使用指定的 HttpMethod 调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> InvokeApiAsync (string apiName, System.Net.Http.HttpContent content, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> requestHeaders, System.Collections.Generic.IDictionary<string,string> parameters);
abstract member InvokeApiAsync : string * System.Net.Http.HttpContent * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function InvokeApiAsync (apiName As String, content As HttpContent, method As HttpMethod, requestHeaders As IDictionary(Of String, String), parameters As IDictionary(Of String, String)) As Task(Of HttpResponseMessage)

参数

apiName
String

自定义 API 的名称。

content
HttpContent

HTTP 内容。

method
HttpMethod

HTTP 方法。

requestHeaders
IDictionary<String,String>

要在 HttpRequest 中包括的用户定义的标头的字典。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

返回

来自自定义 api 调用的 HTTP 响应。

适用于

InvokeApiAsync(String, JToken, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, Newtonsoft.Json.Linq.JToken body, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * Newtonsoft.Json.Linq.JToken * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, body As JToken, Optional cancellationToken As CancellationToken = Nothing) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

body
Newtonsoft.Json.Linq.JToken

要作为 HTTP 正文发送的值。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<Newtonsoft.Json.Linq.JToken>

适用于

InvokeApiAsync(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<Newtonsoft.Json.Linq.JToken>

适用于

InvokeApiAsync(String, JToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, Newtonsoft.Json.Linq.JToken body);
abstract member InvokeApiAsync : string * Newtonsoft.Json.Linq.JToken -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, body As JToken) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

body
Newtonsoft.Json.Linq.JToken

要作为 HTTP 正文发送的值。

返回

Task<Newtonsoft.Json.Linq.JToken>

适用于

InvokeApiAsync(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName);
abstract member InvokeApiAsync : string -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

返回

Task<Newtonsoft.Json.Linq.JToken>

适用于

InvokeApiAsync(String, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

public System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> InvokeApiAsync (string apiName, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters);
abstract member InvokeApiAsync : string * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>
Public Function InvokeApiAsync (apiName As String, method As HttpMethod, parameters As IDictionary(Of String, String)) As Task(Of JToken)

参数

apiName
String

自定义 API 的名称。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

返回

Task<Newtonsoft.Json.Linq.JToken>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<U> InvokeApiAsync<T,U> (string apiName, T body, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * 'T * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'U>
Public Function InvokeApiAsync(Of T, U) (apiName As String, body As T, method As HttpMethod, parameters As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Task(Of U)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

U

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

body
T

要作为 HTTP 正文发送的值。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<U>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

public System.Threading.Tasks.Task<U> InvokeApiAsync<T,U> (string apiName, T body, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters);
abstract member InvokeApiAsync : string * 'T * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task<'U>
Public Function InvokeApiAsync(Of T, U) (apiName As String, body As T, method As HttpMethod, parameters As IDictionary(Of String, String)) As Task(Of U)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

U

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

body
T

要作为 HTTP 正文发送的值。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

返回

Task<U>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T,U>(String, T)

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<U> InvokeApiAsync<T,U> (string apiName, T body);
abstract member InvokeApiAsync : string * 'T -> System.Threading.Tasks.Task<'U>
Public Function InvokeApiAsync(Of T, U) (apiName As String, body As T) As Task(Of U)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

U

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

body
T

要作为 HTTP 正文发送的值。

返回

Task<U>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T,U>(String, T, CancellationToken)

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<U> InvokeApiAsync<T,U> (string apiName, T body, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'U>
Public Function InvokeApiAsync(Of T, U) (apiName As String, body As T, Optional cancellationToken As CancellationToken = Nothing) As Task(Of U)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

U

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

body
T

要作为 HTTP 正文发送的值。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<U>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

public System.Threading.Tasks.Task<T> InvokeApiAsync<T> (string apiName, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters);
abstract member InvokeApiAsync : string * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task<'T>
Public Function InvokeApiAsync(Of T) (apiName As String, method As HttpMethod, parameters As IDictionary(Of String, String)) As Task(Of T)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

参数

apiName
String

自定义 API 的名称。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

返回

Task<T>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T>(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<T> InvokeApiAsync<T> (string apiName, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function InvokeApiAsync(Of T) (apiName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

类型参数

T

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<T>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T>(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

public System.Threading.Tasks.Task<T> InvokeApiAsync<T> (string apiName);
abstract member InvokeApiAsync : string -> System.Threading.Tasks.Task<'T>
Public Function InvokeApiAsync(Of T) (apiName As String) As Task(Of T)

类型参数

T

从 Microsoft Azure 移动服务返回的实例的类型。

参数

apiName
String

自定义 API 的名称。

返回

Task<T>

来自自定义 api 调用的响应内容。

适用于

InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken)

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

public System.Threading.Tasks.Task<T> InvokeApiAsync<T> (string apiName, System.Net.Http.HttpMethod method, System.Collections.Generic.IDictionary<string,string> parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeApiAsync : string * System.Net.Http.HttpMethod * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function InvokeApiAsync(Of T) (apiName As String, method As HttpMethod, parameters As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

类型参数

T

发送到 Microsoft Azure 移动服务的实例的类型。

参数

apiName
String

自定义 API 的名称。

method
HttpMethod

HTTP 方法。

parameters
IDictionary<String,String>

要在请求 URI 查询字符串中包括的用户定义的参数和值的字典。

cancellationToken
CancellationToken

CancellationToken 观察的标记

返回

Task<T>

来自自定义 api 调用的响应内容。

适用于