Class
ChatterBase

Base class used for ClientChatter and ServerChatter. Combines some fields/properties/methods of the two to reduce code duplication.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public class ChatterBase

Inheritance: objectChatterBase

Derived Classes: ServerChatter

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()

Properties

data

The data stream for the request/response.

Declaration

cs-api-definition
protected virtual MemoryStream data { get; }

Property Value

MemoryStream

isRequest

True if this is a request (client) connection, False if it is a response (server) connection

Declaration

cs-api-definition
protected virtual bool isRequest { get; }

Property Value

bool

Methods

AreHeadersAvailable(Session)

Check the data stream and find if headers are fully transmitted to us. For HTTP/1.1 Scans stream for the \r\n\r\n (or variants) sequence, which indicates that the header block is complete. For HTTP/2 the check is done elsewhere and this code is not executed. SIDE EFFECTS: iBodySeekProgress is updated and maintained across calls to this function iEntityBodyOffset is updated if the end of headers is found

Declaration

cs-api-definition
public bool AreHeadersAvailable(Session oS)

Parameters

oS

Session

Returns

bool

True if the full set of headers are available

StreamHTTP2BodyPart(Session, long, out byte[], out bool)

Stream whatever data frames are present in the buffer at the specified offset

Declaration

cs-api-definition
public long StreamHTTP2BodyPart(Session oS, long offset, out byte[] arrResult, out bool isFinal)

Parameters

oS

Session

The parent session of this connection

offset

long

Offset in the received data to start leaking the body from

arrResult

byte[]

Output array buffer that will hold the parsed data

isFinal

bool

True if the last parsed frame has an 'EndOfStream' flag set

Returns

long

The parser's final position (offset) in the data stream. This can be less than the data strem length if extra frames or incomplete frames are present.

TakeHTTP2EntityAsync(Session)

Get the request/response body from a stream

Declaration

cs-api-definition
public Task<byte[]> TakeHTTP2EntityAsync(Session oS)

Parameters

oS

Session

Returns

Task<byte[]>

A byte array containing the request/response data