Class
ClientChatter

The ClientChatter object, exposed as the oRequest object on the Session object, represents a single web request.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public class ClientChatter

Inheritance: objectClientChatter

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

Fields

pipeClient

The ClientPipe object which is connected to the client, or null.

Declaration

cs-api-definition
public ClientPipe pipeClient

Field Value

ClientPipe

Properties

BufferRequest

Controls whether the request body is streamed to the server as it is read from the client.

Declaration

cs-api-definition
[CodeDescription("Controls whether the request body is streamed to the server as it is read from the client.")]
public bool BufferRequest { get; set; }

Property Value

bool

InboundPort

Returns the port on which Fiddler read the request (typically 8888)

Declaration

cs-api-definition
[CodeDescription("Returns the port on which Fiddler read the request (typically 8888). Only available while the request is alive.")]
public int InboundPort { get; }

Property Value

int

bClientSocketReused

Was this request received from a reused client connection? Looks at SessionFlags.ClientPipeReused flag on owning Session.

Declaration

cs-api-definition
public bool bClientSocketReused { get; }

Property Value

bool

headers

HTTP Headers sent in the client request, or null.

Declaration

cs-api-definition
public HTTPRequestHeaders headers { get; set; }

Property Value

HTTPRequestHeaders

host

Note: This returns the request's HOST header, which may include a trailing port #. If the Host is an IPv6 literal, it will be enclosed in brackets '[' and ']'

Declaration

cs-api-definition
public string host { get; }

Property Value

string

this[string]

Simple indexer into the Request Headers object

Declaration

cs-api-definition
public string this[string sHeader] { get; set; }

Parameters

sHeader

string

Property Value

string

Methods

FailSessionAsync(int, string, string)

Send a HTTP/XXX Error Message to the Client, calling FiddlerApplication.BeforeReturningError and DoReturningError in FiddlerScript. Note: This method does not poison the Server pipe, so if poisoning is desired, it's the caller's responsibility to do that. Note: Because this method uses Connection: close on the returned response, it has the effect of poisoning the client pipe

Declaration

cs-api-definition
public Task FailSessionAsync(int iError, string sErrorStatusText, string sErrorBody)

Parameters

iError

int

Response code

sErrorStatusText

string

Response status text

sErrorBody

string

Body of the HTTP Response

Returns

Task

SendBodyAsync(byte[], int, bool)

Send the response body back to the client

Declaration

cs-api-definition
public Task<int> SendBodyAsync(byte[] arrBodyBytes, int length, bool final = true)

Parameters

arrBodyBytes

byte[]

Array containing a part or the whole body

length

int

How many bytes to send

final

bool

True if this is the final part of the body to send

Returns

Task<int>

The size of the bytes being transferred

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.