WebInvokeAttribute.Method プロパティ

定義

サービス操作が応答するプロトコル (HTTP など) のメソッドを取得または設定します。

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

プロパティ値

操作に関連付けられているプロトコル メソッド。

Method プロパティを設定する方法を次の例に示します。

[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

注釈

Method の既定値は POST です。

適用対象