Search Results for

    Show / Hide Table of Contents

    Class WebResponse

    Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.

    Inheritance
    object
    MarshalByRefObject
    WebResponse
    HttpWebResponse
    Implements
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: System.Net
    Assembly: System.Net.Http.dll
    Syntax
    public abstract class WebResponse : MarshalByRefObject, IDisposable
    Remarks

    This is the abstract base class for all WebResponse objects.

    Constructors

    WebResponse()

    Initializes a new instance of the WebResponse class.

    Declaration
    protected WebResponse()

    Properties

    ContentLength

    When overridden in a descendant class, gets or sets the content length of data being received.

    Declaration
    public virtual long ContentLength { get; set; }
    Property Value
    Type Description
    long

    The number of bytes returned from the Internet resource.

    ContentType

    When overridden in a derived class, gets or sets the content type of the data being received.

    Declaration
    public virtual string ContentType { get; set; }
    Property Value
    Type Description
    string

    A string that contains the content type of the response.

    Headers

    When overridden in a derived class, gets a collection of header name-value pairs associated with this request.

    Declaration
    public virtual WebHeaderCollection Headers { get; }
    Property Value
    Type Description
    WebHeaderCollection

    An instance of the WebHeaderCollection class that contains header values associated with this response.

    ResponseUri

    When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.

    Declaration
    public virtual Uri ResponseUri { get; }
    Property Value
    Type Description
    Uri

    An instance of the Uri class that contains the URI of the Internet resource that actually responded to the request.

    Remarks

    This property gets the final Response URI, that includes any changes that may have transpired from the orginal request.

    Methods

    Close()

    When overridden by a descendant class, closes the response stream.

    Declaration
    public virtual void Close()

    Dispose()

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Finalize()

    Declaration
    protected override void Finalize()

    GetResponseStream()

    When overridden in a descendant class, returns the data stream from the Internet resource.

    Declaration
    public virtual Stream GetResponseStream()
    Returns
    Type Description
    Stream

    An instance of the Stream class for reading data from the Internet resource.

    Implements

    IDisposable

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    In This Article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX