HttpMethod Klasse

Definition

Ruft HTTP-Standardmethoden wie GET und POST ab und erstellt neue HTTP-Methoden.

public ref class HttpMethod sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpMethodFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpMethod final : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpMethodFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpMethod final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpMethodFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpMethod : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpMethodFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpMethod : IStringable
function HttpMethod(method)
Public NotInheritable Class HttpMethod
Implements IStringable
Vererbung
Object Platform::Object IInspectable HttpMethod
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Hinweise

Die häufigste Verwendung von HttpMethod ist das Abrufen einer HTTP-Standardmethode (Verb) aus einer Eigenschaft für diese Klasse. Wenn eine App jedoch einen anderen Wert für die HTTP-Methode benötigt, initialisiert der HttpMethod-Konstruktor eine neue instance der HttpMethod mit einer HTTP-Methode, die der App-Entwickler angibt.

Konstruktoren

HttpMethod(String)

Initialisiert eine neue instance der HttpMethod-Klasse mit einer bestimmten HTTP-Methode.

Eigenschaften

Delete

Ruft die HTTP DELETE-Methode ab.

Get

Ruft die HTTP GET-Methode ab.

Head

Ruft die HTTP-HEAD-Methode ab.

Method

Ruft die HTTP-Methode ab.

Options

Ruft die HTTP OPTIONS-Methode ab.

Patch

Ruft die HTTP PATCH-Methode ab,

Post

Ruft die HTTP POST-Methode ab.

Put

Ruft die HTTP PUT-Methode ab.

Methoden

ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle HttpMethod-Objekt darstellt.

Gilt für:

Weitere Informationen