WebInvokeAttribute.Method Eigenschaft

Definition

Ruft die Protokollmethode ab, auf die der Dienstvorgang antwortet (z. B. HTTP), oder legt sie fest.

public:
 property System::String ^ Method { System::String ^ get(); void set(System::String ^ value); };
public string Method { get; set; }
member this.Method : string with get, set
Public Property Method As String

Eigenschaftswert

String

Die dem Vorgang zugeordnete Protokollmethode.

Beispiele

Im folgenden Beispiel wird das Festlegen der Method-Eigenschaft veranschaulicht.

[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "Mod?x={x}&y={y}")]
long Mod(long x, long y);
 <OperationContract()> _
<WebInvoke(Method:="POST", UriTemplate:="Mod?x={x}&y={y}")> _
Function Modulo(ByVal x As Long, ByVal y As Long) As Long

Hinweise

Der Standardwert für Method ist POST.

Gilt für