Method Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the method for the request.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

public override string Method { get; set; }

Property Value

Type: System..::..String
The request method to use to contact the Internet resource. The default value is GET.

The Method property can be set to any of the HTTP 1.1 protocol verbs: GET, HEAD, POST, PUT, DELETE, TRACE, or OPTIONS.

If the ContentLength property is set to any value other than -1, the Method property must be set to a protocol property that uploads data.

Show: