Język

DownstreamWebApi.CallWebApiForAppAsync Metoda

Definicja

Wywołuje podrzędny internetowy interfejs API dla aplikacji z wymaganymi zakresami.

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)

Parametry

serviceName
String

Nazwa usługi opisującej podrzędny internetowy interfejs API. Dla jednego podrzędnego DownstreamWebApiOptionsinternetowego interfejsu API sieci Web może istnieć kilka konfiguracji o nazwach mapowanych na poszczególne sekcje. Możesz przekazać wartość null, ale w takim przypadku downstreamWebApiOptionsOverride należy je ustawić.

authenticationScheme
String

Schemat uwierzytelniania. Jeśli wartość null, użyje metody OpenIdConnectDefault.AuthenticationScheme, jeśli zostanie wywołana z aplikacji internetowej, i JwtBearerDefault.AuthenticationScheme, jeśli zostanie wywołana z internetowego interfejsu API.

downstreamWebApiOptionsOverride
Action<DownstreamWebApiOptions>

Zastępuje opcje proponowane w konfiguracji opisanej przez serviceName.

content
StringContent

Zawartość HTTP w przypadku, gdy HttpMethod to Patch, , PutPost.

Zwraca

Element HttpResponseMessage , który aplikacja będzie przetwarzać.

Implementuje

Dotyczy