WebResponse Class
NuGet: GHIElectronics.TinyCLR.Networking.Http
Assembly: GHIElectronics.TinyCLR.Networking.Http
Namespace: System.Net
Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.
public abstract class WebResponse : MarshalByRefObject, IDisposable
Constructors
WebResponse()
protected WebResponse()
Initializes a new instance of the WebResponse class.
Properties
ContentLength
public virtual long ContentLength { get; set; }
When overridden in a descendant class, gets or sets the content length of data being received.
ContentType
public virtual string ContentType { get; set; }
When overridden in a derived class, gets or sets the content type of the data being received.
ResponseUri
public virtual Uri ResponseUri { get; }
When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.
Headers
public virtual WebHeaderCollection Headers { get; }
When overridden in a derived class, gets a collection of header name-value pairs associated with this request.
Methods
GetResponseStream()
public virtual Stream GetResponseStream()
When overridden in a descendant class, returns the data stream from the Internet resource.
Returns Stream — An instance of the System.IO.Stream class for reading data from the Internet resource.
Close()
public virtual void Close()
When overridden by a descendant class, closes the response stream.
Dispose()
public void Dispose()
Releases the resources used by the response.
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Releases the unmanaged resources and optionally the managed resources used by the response.