WebInvokeAttribute.Method Propriété

Définition

Obtient ou définit la méthode de protocole (par exemple, HTTP) à laquelle l’opération de service répond.

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

Valeur de propriété

String

Méthode de protocole associée à l'opération.

Exemples

L'exemple suivant indique comment définir la propriété 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

Remarques

Method possède par défaut la valeur POST.

S’applique à