IMobileServiceClient.InvokeApiAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP method. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data will sent to through the query string. |
InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP method. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync(String, JToken, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST, with support for sending HTTP content. |
InvokeApiAsync(String, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST. |
InvokeApiAsync(String, JToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST, with support for sending HTTP content. |
InvokeApiAsync(String) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST. |
InvokeApiAsync(String, HttpMethod, IDictionary<String,String>) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data will sent to through the query string. |
InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be sent though the HTTP content or the query string. |
InvokeApiAsync<T,U>(String, T) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST with support for sending HTTP content. |
InvokeApiAsync<T,U>(String, T, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST with support for sending HTTP content. |
InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be passed using the query string. |
InvokeApiAsync<T>(String, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST. |
InvokeApiAsync<T>(String) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST. |
InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken) |
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be passed using the query string. |
InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- content
- HttpContent
The HTTP content.
- method
- HttpMethod
The HTTP method.
- requestHeaders
- IDictionary<String,String>
A dictionary of user-defined headers to include in the HttpRequest.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The HTTP Response from the custom api invocation.
Applies to
InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP method. Additional data can be sent though the HTTP content or the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- body
- Newtonsoft.Json.Linq.JToken
The value to be sent as the HTTP body.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data will sent to through the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP method. Additional data can be sent though the HTTP content or the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- body
- Newtonsoft.Json.Linq.JToken
The value to be sent as the HTTP body.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- content
- HttpContent
The HTTP content.
- method
- HttpMethod
The HTTP method.
- requestHeaders
- IDictionary<String,String>
A dictionary of user-defined headers to include in the HttpRequest.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
Returns
The HTTP Response from the custom api invocation.
Applies to
InvokeApiAsync(String, JToken, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST, with support for sending HTTP content.
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)
Parameters
- apiName
- String
The name of the custom API.
- body
- Newtonsoft.Json.Linq.JToken
The value to be sent as the HTTP body.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
Applies to
InvokeApiAsync(String, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.
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)
Parameters
- apiName
- String
The name of the custom API.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
Applies to
InvokeApiAsync(String, JToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST, with support for sending HTTP content.
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)
Parameters
- apiName
- String
The name of the custom API.
- body
- Newtonsoft.Json.Linq.JToken
The value to be sent as the HTTP body.
Returns
Applies to
InvokeApiAsync(String)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.
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)
Parameters
- apiName
- String
The name of the custom API.
Returns
Applies to
InvokeApiAsync(String, HttpMethod, IDictionary<String,String>)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data will sent to through the query string.
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)
Parameters
- apiName
- String
The name of the custom API.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be sent though the HTTP content or the query string.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
- U
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- body
- T
The value to be sent as the HTTP body.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be sent though the HTTP content or the query string.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
- U
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- body
- T
The value to be sent as the HTTP body.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T,U>(String, T)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST with support for sending HTTP content.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
- U
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- body
- T
The value to be sent as the HTTP body.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T,U>(String, T, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST with support for sending HTTP content.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
- U
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- body
- T
The value to be sent as the HTTP body.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be passed using the query string.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T>(String, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.
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)
Type Parameters
- T
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T>(String)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.
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)
Type Parameters
- T
The type of instance returned from the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
Returns
The response content from the custom api invocation.
Applies to
InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken)
Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be passed using the query string.
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)
Type Parameters
- T
The type of instance sent to the Microsoft Azure Mobile Service.
Parameters
- apiName
- String
The name of the custom API.
- method
- HttpMethod
The HTTP method.
- parameters
- IDictionary<String,String>
A dictionary of user-defined parameters and values to include in the request URI query string.
- cancellationToken
- CancellationToken
The CancellationToken token to observe
Returns
The response content from the custom api invocation.
Applies to
Azure SDK for .NET