Share via


MobileServiceClient.InvokeApiAsync Method

Definition

Overloads

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

Invokes a user-defined custom API of a Windows Azure Mobile Service using the specified HttpMethod. 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 Windows 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, 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, 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)

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, 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,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, 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>(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 Windows 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>
override this.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 AP.

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.

Implements

Applies to

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

Invokes a user-defined custom API of a Windows 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);
member this.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>
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>
override this.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 AP.

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.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

Implements

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>
override this.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

Task<Newtonsoft.Json.Linq.JToken>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<U>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<U>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<U>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<U>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<T>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<T>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<T>

The response content from the custom api invocation.

Implements

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>
override this.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

Task<T>

The response content from the custom api invocation.

Implements

Applies to