Sprache

DownstreamWebApi.CallWebApiForAppAsync Methode

Definition

Ruft die downstream-Web-API für die App mit den erforderlichen Bereichen auf.

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

Parameter

serviceName
String

Name des Diensts, der die downstream-Web-API beschreibt. Es können mehrere Konfigurationsnamenabschnitte DownstreamWebApiOptionszugeordnet werden, die jeweils für eine nachgeschaltete Web-API zugeordnet sind. Sie können NULL übergeben, müssen jedoch in diesem Fall downstreamWebApiOptionsOverride festgelegt werden.

authenticationScheme
String

Authentifizierungsschema. Wenn null, wird OpenIdConnectDefault.AuthenticationScheme verwendet, wenn von einer Web-App aufgerufen wird, und JwtBearerDefault.AuthenticationScheme, wenn von einer Web-API aufgerufen wird.

downstreamWebApiOptionsOverride
Action<DownstreamWebApiOptions>

Überschreibt die optionen, die in der konfiguration vorgeschlagen werden, die von serviceName.

content
StringContent

HTTP-Inhalt in dem Fall, in dem HttpMethod , PatchPost. Put

Gibt zurück

Eine HttpResponseMessage , die die Anwendung verarbeitet.

Implementiert

Gilt für: