HttpRequestJsonExtensions.HasJsonContentType(HttpRequest) Metoda

Definicja

Sprawdza nagłówek Content-Type pod kątem typów JSON.

public:
[System::Runtime::CompilerServices::Extension]
 static bool HasJsonContentType(Microsoft::AspNetCore::Http::HttpRequest ^ request);
public static bool HasJsonContentType (this Microsoft.AspNetCore.Http.HttpRequest request);
static member HasJsonContentType : Microsoft.AspNetCore.Http.HttpRequest -> bool
<Extension()>
Public Function HasJsonContentType (request As HttpRequest) As Boolean

Parametry

request
HttpRequest

Zwraca

true, jeśli nagłówek Content-Type reprezentuje typ zawartości JSON; w przeciwnym razie wartość false.

Dotyczy