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)
Syntax
'Declaration
Public Overrides Property Method As String
public override string Method { get; set; }
public:
virtual property String^ Method {
String^ get () override;
void set (String^ value) override;
}
abstract Method : string with get, set
override Method : string with get, set
override function get Method () : String
override function set Method (value : String)
Property Value
Type: System. . :: . .String
The request method to use to contact the Internet resource. The default value is GET.
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.