Search Results for

    Show / Hide Table of Contents

    Class RequestResponseBase

    Abstract base class for similar objects shared by both request and response objects.

    Inheritance
    object
    RequestResponseBase
    Request
    Response
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Titanium.Web.Proxy.Http
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public abstract class RequestResponseBase

    Properties

    | Edit this page View Source

    Body

    Body as byte array

    Declaration
    [Browsable(false)]
    public byte[] Body { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    BodyInternal

    Cached body content as byte array.

    Declaration
    protected byte[]? BodyInternal { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    BodyString

    Body as string. Use the encoding specified to decode the byte[] data to string

    Declaration
    [Browsable(false)]
    public string BodyString { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ContentEncoding

    Content encoding for this request/response.

    Declaration
    public string? ContentEncoding { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ContentLength

    Length of the body.

    Declaration
    public long ContentLength { get; set; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    ContentType

    Content-type of the request/response.

    Declaration
    public string? ContentType { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Encoding

    Encoding for this request/response.

    Declaration
    public Encoding Encoding { get; }
    Property Value
    Type Description
    Encoding
    | Edit this page View Source

    HasBody

    Has the request/response body?

    Declaration
    public abstract bool HasBody { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    HeaderText

    The header text.

    Declaration
    public abstract string HeaderText { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Headers

    Collection of all headers.

    Declaration
    public HeaderCollection Headers { get; }
    Property Value
    Type Description
    HeaderCollection
    | Edit this page View Source

    HttpVersion

    Http Version.

    Declaration
    public Version HttpVersion { get; set; }
    Property Value
    Type Description
    Version
    | Edit this page View Source

    IsBodyRead

    Was the body read by user?

    Declaration
    public bool IsBodyRead { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsChunked

    Is body send as chunked bytes.

    Declaration
    public bool IsChunked { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    KeepBody

    Keeps the body data after the session is finished.

    Declaration
    public bool KeepBody { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    TrailingHeaders

    Trailing headers ("trailers") carried after the body, per RFC 9110 §6.5 / RFC 7230 §4.1.2 (HTTP/1.1 chunked) and as a second HEADERS block after DATA on HTTP/2/HTTP/3. Empty by default (lazily allocated on first access). Trailers are not defined for, and are always ignored on, fixed Content-Length bodies.

    On the read side, this is populated once the body has actually been consumed (streamed, buffered, or drained) - it is not guaranteed to be populated yet during BeforeRequest/BeforeResponse. It is reliably observable in AfterResponse for streaming pass-through, or earlier only when the body was explicitly buffered (e.g. via GetResponseBody/GetRequestBody).

    On the write side, entries added here before the body finishes writing are emitted as the HTTP/1.1 trailer block after the terminating zero-length chunk, or as trailer HEADERS on HTTP/2/HTTP/3. A small set of framing/routing header fields (e.g. Transfer-Encoding, Content-Length, Trailer, Host) are forbidden in a trailer and will fail with a clear exception rather than being silently dropped.

    Declaration
    public HeaderCollection TrailingHeaders { get; }
    Property Value
    Type Description
    HeaderCollection

    Methods

    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX