WebInvokeAttribute.Method Propiedad

Definición

Obtiene o establece el método del protocolo (por ejemplo, HTTP) al que responde la operación de servicio.

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

Valor de propiedad

String

El método protocolar asociado a la operación.

Ejemplos

En el ejemplo siguiente se muestra cómo establecer la propiedad 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

Comentarios

Method toma el valor predeterminado de POST.

Se aplica a