HttpWebResponse.Method Property

 

Gets the method that is used to return the response.

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

abstract Method : string with get
override Method : string with get

Property Value

Type: System.String

A string that contains the HTTP method that is used to return the response.

Exception Condition
ObjectDisposedException

The current instance has been disposed.

Method returns the method that is used to return the response. Common HTTP methods are GET, HEAD, POST, PUT, and DELETE.

The following example checks the string contained in Method, to determine the Http method invoked by the Web server.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: