Share via


WebInvokeAttribute.Method Propriedade

Definição

Obtém ou define o método de protocolo (por exemplo, HTTP) que responde a operação de serviço.

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 da propriedade

String

O método de protocolo associado à operação.

Exemplos

O exemplo a seguir mostra como definir a Method propriedade.

[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

Comentários

Method o padrão é POST.

Aplica-se a