次の方法で共有


IDownstreamWebApi.CallWebApiForAppAsync Method

Definition

Overloads

CallWebApiForAppAsync(String, Action<DownstreamWebApiOptions>, StringContent)

Calls the downstream web API for the app, with the required scopes.

CallWebApiForAppAsync(String, String, Action<DownstreamWebApiOptions>, StringContent)

Calls the downstream web API for the app, with the required scopes.

CallWebApiForAppAsync(String, Action<DownstreamWebApiOptions>, StringContent)

Calls the downstream web API for the app, with the required scopes.

public virtual System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync (string serviceName, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Net.Http.StringContent? content = default);
abstract member CallWebApiForAppAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
override this.CallWebApiForAppAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Overridable Function CallWebApiForAppAsync (serviceName As String, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)

Parameters

serviceName
String

Name of the service describing the downstream web API. There can be several configuration named sections mapped to a DownstreamWebApiOptions, each for one downstream web API. You can pass-in null, but in that case downstreamWebApiOptionsOverride needs to be set.

downstreamWebApiOptionsOverride
Action<DownstreamWebApiOptions>

Overrides the options proposed in the configuration described by serviceName.

content
StringContent

HTTP content in the case where HttpMethod is Patch, Post, Put.

Returns

An HttpResponseMessage that the application will process.

Applies to

CallWebApiForAppAsync(String, String, Action<DownstreamWebApiOptions>, StringContent)

Calls the downstream web API for the app, with the required scopes.

public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync (string serviceName, string? authenticationScheme, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Net.Http.StringContent? content = default);
abstract member CallWebApiForAppAsync : string * string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function CallWebApiForAppAsync (serviceName As String, authenticationScheme As String, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)

Parameters

serviceName
String

Name of the service describing the downstream web API. There can be several configuration named sections mapped to a DownstreamWebApiOptions, each for one downstream web API. You can pass-in null, but in that case downstreamWebApiOptionsOverride needs to be set.

authenticationScheme
String

Authentication scheme. If null, will use OpenIdConnectDefault.AuthenticationScheme if called from a web app, and JwtBearerDefault.AuthenticationScheme if called from a web API.

downstreamWebApiOptionsOverride
Action<DownstreamWebApiOptions>

Overrides the options proposed in the configuration described by serviceName.

content
StringContent

HTTP content in the case where HttpMethod is Patch, Post, Put.

Returns

An HttpResponseMessage that the application will process.

Applies to