Partager via


IDownstreamApi Interface

Definition

Interface used to call a downstream API, for instance from controllers.

public interface IDownstreamApi
type IDownstreamApi = interface
Public Interface IDownstreamApi

Methods

CallApiAsync(DownstreamApiOptions, ClaimsPrincipal, HttpContent, CancellationToken)

Calls the downstream API based on a programmatic description of the downstream API. The choice of calling the API on behalf of the user or the app, is made using RequestAppToken.

CallApiAsync(String, Action<DownstreamApiOptions>, ClaimsPrincipal, HttpContent, CancellationToken)

Calls the downstream API based on a description of the downstream API in the configuration (service name), overridatable programmatically. The choice of calling the API on behalf of the user or the app, is made by the configuration or programmatically. This is the lowest level API. There are other APIs for specific Http methods.

CallApiForAppAsync(String, Action<DownstreamApiOptions>, HttpContent, CancellationToken)

Calls the downstream API on behalf of the app itself, with the required scopes.

CallApiForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptions>, CancellationToken)

Calls a downstream API consuming JSON with some data and returns data.

CallApiForAppAsync<TOutput>(String, Action<DownstreamApiOptions>, CancellationToken)

Call a web API endpoint with an HttpGet, and return strongly typed data.

CallApiForUserAsync(String, Action<DownstreamApiOptions>, ClaimsPrincipal, HttpContent, CancellationToken)

Calls the downstream API on behalf of the user, based on a description of the downstream API in the configuration (service name), overridatable programmatically. This is a lower level API. There are other APIs for specific Http methods.

CallApiForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptions>, ClaimsPrincipal, CancellationToken)

Calls a downstream API consuming JSON with some data and returns data.

CallApiForUserAsync<TOutput>(String, Action<DownstreamApiOptions>, ClaimsPrincipal, CancellationToken)

Call a web API endpoint with an HttpGet, and return strongly typed data.

DeleteForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Delete, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

DeleteForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Delete, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

DeleteForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Delete, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

DeleteForUserAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Delete, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

GetForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Get, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

GetForAppAsync<TOutput>(String, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Get, a downstream API returning data. By default the returned data is deserialized from JSON but you can provide your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

GetForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Get, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

GetForUserAsync<TOutput>(String, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Get, a downstream API returning data. By default the returned data is deserialized from JSON but you can provide your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PatchForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Patch, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PatchForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Patch, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PatchForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Patch, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PatchForUserAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Patch, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PostForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Post, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PostForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Post, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PostForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Post, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PostForUserAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Post, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PutForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Put, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PutForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Calls, using Put, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PutForUserAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Put, a downstream API with some input data and returning data. By default the input data is serialized in JSON and the returned data is deserialized from JSON but you can provide your own serializer and your own deserializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

PutForUserAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, ClaimsPrincipal, CancellationToken)

Calls, using Put, a downstream API with some input data . By default the input data is serialized in JSON but you can provide your own serializer in the action you pass-in through the downstreamApiOptionsOverride parameter.

Applies to