Share via


HttpWebRequest.Method Property

Gets or sets the HTTP method of this request.

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

Syntax

public override string Method { get; set; }

Property Value

The request method to use to contact the Internet resource. The default value is GET.

Remarks

This method represents the initial origin verb, which is unchanged and unaffected by redirects.

Exceptions

Exception type Condition
ArgumentException

An empty string was specified.

-or-

An invalid method was specified.

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

HttpWebRequest Class
HttpWebRequest Members
System.Net Namespace