Provides a response from a Uniform Resource Identifier (URI). This is an abstract
class.
More...
|
virtual void | Close () |
| When overridden by a descendant class, closes the response stream. More...
|
|
void | Dispose () |
| Releases the unmanaged resources used by the T:System.Net.WebResponse object. More...
|
|
virtual Stream | GetResponseStream () |
| When overridden in a descendant class, returns the data stream from the Internet resource. More...
|
|
object | GetLifetimeService () |
| Retrieves the current lifetime service object that controls the lifetime policy for this instance. More...
|
|
virtual object | InitializeLifetimeService () |
| Obtains a lifetime service object to control the lifetime policy for this instance. More...
|
|
virtual ObjRef | CreateObjRef (Type requestedType) |
| Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. More...
|
|
|
| WebResponse () |
| Initializes a new instance of the T:System.Net.WebResponse class. More...
|
|
| WebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext) |
| Initializes a new instance of the T:System.Net.WebResponse class from the specified instances of the T:System.Runtime.Serialization.SerializationInfo and T:System.Runtime.Serialization.StreamingContext classes. More...
|
|
virtual void | GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext) |
| Populates a T:System.Runtime.Serialization.SerializationInfo with the data that is needed to serialize the target object. More...
|
|
virtual void | Dispose (bool disposing) |
| Releases the unmanaged resources used by the T:System.Net.WebResponse object, and optionally disposes of the managed resources. More...
|
|
MarshalByRefObject | MemberwiseClone (bool cloneIdentity) |
| Creates a shallow copy of the current T:System.MarshalByRefObject object. More...
|
|
|
virtual long | ContentLength [get, set] |
| When overridden in a descendant class, gets or sets the content length of data being received. More...
|
|
virtual string | ContentType [get, set] |
| When overridden in a derived class, gets or sets the content type of the data being received. More...
|
|
virtual Uri | ResponseUri [get] |
| When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request. More...
|
|
virtual WebHeaderCollection | Headers [get] |
| When overridden in a derived class, gets a collection of header name-value pairs associated with this request. More...
|
|
virtual bool | SupportsHeaders [get] |
| Gets a value that indicates if headers are supported. More...
|
|
Provides a response from a Uniform Resource Identifier (URI). This is an abstract
class.
Definition at line 10 of file WebResponse.cs.
◆ WebResponse() [1/2]
System.Net.WebResponse.WebResponse |
( |
| ) |
|
|
protected |
Initializes a new instance of the T:System.Net.WebResponse class.
Definition at line 119 of file WebResponse.cs.
◆ WebResponse() [2/2]
Initializes a new instance of the T:System.Net.WebResponse class from the specified instances of the T:System.Runtime.Serialization.SerializationInfo and T:System.Runtime.Serialization.StreamingContext classes.
- Parameters
-
serializationInfo | An instance of the T:System.Runtime.Serialization.SerializationInfo class that contains the information required to serialize the new T:System.Net.WebRequest instance. |
streamingContext | An instance of the T:System.Runtime.Serialization.StreamingContext class that indicates the source of the serialized stream that is associated with the new T:System.Net.WebRequest instance. |
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to access the constructor, when the constructor is not overridden in a descendant class. |
Definition at line 127 of file WebResponse.cs.
◆ Close()
virtual void System.Net.WebResponse.Close |
( |
| ) |
|
|
virtual |
◆ Dispose() [1/2]
void System.Net.WebResponse.Dispose |
( |
| ) |
|
◆ Dispose() [2/2]
virtual void System.Net.WebResponse.Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
Releases the unmanaged resources used by the T:System.Net.WebResponse object, and optionally disposes of the managed resources.
- Parameters
-
disposing | true to release both managed and unmanaged resources; false to releases only unmanaged resources. |
Reimplemented in System.Net.HttpWebResponse.
Definition at line 166 of file WebResponse.cs.
◆ GetObjectData()
◆ GetResponseStream()
virtual Stream System.Net.WebResponse.GetResponseStream |
( |
| ) |
|
|
virtual |
When overridden in a descendant class, returns the data stream from the Internet resource.
- Returns
- An instance of the T:System.IO.Stream class for reading data from the Internet resource.
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |
Reimplemented in System.Net.HttpWebResponse, System.Net.FtpWebResponse, and System.Net.FileWebResponse.
Definition at line 184 of file WebResponse.cs.
◆ IsFromCache
virtual bool System.Net.WebResponse.IsFromCache => m_IsFromCache |
Gets a T:System.Boolean value that indicates whether this response was obtained from the cache.
- Returns
true
if the response was taken from the cache; otherwise, false
.
Definition at line 19 of file WebResponse.cs.
◆ IsMutuallyAuthenticated
virtual bool System.Net.WebResponse.IsMutuallyAuthenticated => false |
Gets a T:System.Boolean value that indicates whether mutual authentication occurred.
- Returns
true
if both client and server were authenticated; otherwise, false
.
Definition at line 42 of file WebResponse.cs.
◆ ContentLength
virtual long System.Net.WebResponse.ContentLength |
|
getset |
When overridden in a descendant class, gets or sets the content length of data being received.
- Returns
- The number of bytes returned from the Internet resource.
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Definition at line 49 of file WebResponse.cs.
◆ ContentType
virtual string System.Net.WebResponse.ContentType |
|
getset |
When overridden in a derived class, gets or sets the content type of the data being received.
- Returns
- A string that contains the content type of the response.
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Definition at line 66 of file WebResponse.cs.
◆ Headers
When overridden in a derived class, gets a collection of header name-value pairs associated with this request.
- Returns
- An instance of the T:System.Net.WebHeaderCollection class that contains header values associated with this response.
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Definition at line 96 of file WebResponse.cs.
◆ ResponseUri
virtual Uri System.Net.WebResponse.ResponseUri |
|
get |
When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.
- Returns
- An instance of the T:System.Uri class that contains the URI of the Internet resource that actually responded to the request.
- Exceptions
-
T:System.NotSupportedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Definition at line 83 of file WebResponse.cs.
◆ SupportsHeaders
virtual bool System.Net.WebResponse.SupportsHeaders |
|
get |
Gets a value that indicates if headers are supported.
- Returns
- Returns T:System.Boolean.
true
if headers are supported; otherwise, false
.
Definition at line 109 of file WebResponse.cs.
The documentation for this class was generated from the following file: