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, 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, 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<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, 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>(String, CancellationToken)

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 = null);
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>

Parameters

apiName
System.String

The name of the custom AP.

content
System.Net.Http.HttpContent

The HTTP content.

method
System.Net.Http.HttpMethod

The HTTP method.

requestHeaders
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined headers to include in the HttpRequest.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

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>
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
System.String

The name of the custom AP.

content
System.Net.Http.HttpContent

The HTTP content.

method
System.Net.Http.HttpMethod

The HTTP method.

requestHeaders
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined headers to include in the HttpRequest.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

Returns

System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

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 = null);
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>

Parameters

apiName
System.String

The name of the custom API.

body
Newtonsoft.Json.Linq.JToken

The value to be sent as the HTTP body.

method
System.Net.Http.HttpMethod

The HTTP Method.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.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 = null);
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>

Parameters

apiName
System.String

The name of the custom API.

body
Newtonsoft.Json.Linq.JToken

The value to be sent as the HTTP body.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.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 = null);
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>

Parameters

apiName
System.String

The name of the custom API.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>

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 = null);
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>

Parameters

apiName
System.String

The name of the custom API.

method
System.Net.Http.HttpMethod

The HTTP method.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken>

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 = null);
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>

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
System.String

The name of the custom API.

body
T

The value to be sent as the HTTP body.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<U>

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 = null);
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>

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
System.String

The name of the custom API.

body
T

The value to be sent as the HTTP body.

method
System.Net.Http.HttpMethod

The HTTP method.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<U>

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 = null);
abstract member InvokeApiAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
override this.InvokeApiAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>

Type Parameters

T

The type of instance returned from the Microsoft Azure Mobile Service.

Parameters

apiName
System.String

The name of the custom API.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.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 = null);
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>

Type Parameters

T

The type of instance sent to the Microsoft Azure Mobile Service.

Parameters

apiName
System.String

The name of the custom API.

method
System.Net.Http.HttpMethod

The HTTP method.

parameters
System.Collections.Generic.IDictionary<System.String,System.String>

A dictionary of user-defined parameters and values to include in the request URI query string.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken token to observe

Returns

System.Threading.Tasks.Task<T>

The response content from the custom api invocation.

Implements

Applies to