Mono Class Library: System.Net.HttpWebResponse Overview | Members

System.Net.HttpWebResponse.Method Property

Gets the method used to return the response. [Edit]

public string Method { get; }

Value

A string that represents the HTTP method used to return the response. [Edit]

Exceptions

TypeReason
ObjectDisposedExceptionThe current instance has been disposed. [Edit]

Remarks

This property is read-only.

Note:

The HttpWebRequest.Method property can be set to any of the HTTP 1.1 protocol methods: GET, HEAD, POST, PUT, DELETE, TRACE, or OPTIONS. The following table describes these methods.

ItemDescription
GETRetrieves in entity-body form the information identified by the HttpWebRequest.RequestUri property of the request associated with the current instance.
HEADIdentical to GET except that the message-body is not returned in the response.
POSTRequests 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.
PUTRequests that the enclosed entity be stored under the supplied Request-URI.
DELETERequests that the origin server delete the resource identified by the Request-URI.
TRACEInvokes a remote, application-layer loopback of the request message.
OPTIONSRequests 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.

For detailed information regarding these methods, see sections 9.2 to 9.8 of RFC 2616.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0