Mono Class Library: System.Net.HttpWebRequest Overview | MembersSystem.Net.HttpWebRequest.Method Property |
Gets or sets the HTTP protocol request method used by the current instance. [Edit]
|
A string containing an HTTP method. The default value is "GET". [Edit]
Type Reason ArgumentException null, string.Empty, or an invalid value was specified for a set operation. [Edit]
If the HttpWebRequest.ContentLength property is set to any value other than -1, the HttpWebRequest.Method property is required to be set to a protocol method that sends request data.
The HttpWebRequest.Method property can be set to any of the following HTTP 1.1 protocol methods:
HTTP Method Description GET Retrieves in entity-body form the information identified by the HttpWebRequest.RequestUri property of the current instance. HEAD Identical to GET except that the message-body is not returned in the response. POST Requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified the Request-URI in the Request-Line. PUT Requests that the enclosed entity be stored under the supplied Request-URI. DELETE Requests that the origin server delete the resource identified by the Request-URI. TRACE Invokes a remote, application-layer loopback of the request message. OPTIONS Requests information about the communication options available on the request/response chain identified by the Request-URI. Note: This allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.Note:[Edit]For detailed information regarding these methods, see sections 9.2 to 9.8 of RFC 2616.
This property overrides WebRequest.Method .
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0