StethoHttpClientRequest class

A wrapper around HttpClientRequest that intercepts outgoing request data and relays it to the Stetho debugging infrastructure.

It buffers written data via a broadcast stream and sends request/response information over a method channel to the native side.

Implemented types

Properties

bufferOutput ↔ bool
Gets or sets if the HttpClientRequest should buffer output.
getter/setter pairoverride
connectionInfo → HttpConnectionInfo?
Gets information about the client connection.
no setteroverride
contentLength ↔ int
Gets and sets the content length of the request.
getter/setter pairoverride
cookies → List<Cookie>
Cookies to present to the server (in the 'cookie' header).
no setteroverride
done → Future<HttpClientResponse>
An HttpClientResponse future that will complete once the response is available.
no setteroverride
encoding ↔ Encoding
The Encoding used when writing strings.
getter/setter pairoverride
followRedirects ↔ bool
Whether to follow redirects automatically.
getter/setter pairoverride
hashCode → int
The hash code for this object.
no setterinherited
headers → HttpHeaders
Returns the client request headers.
no setteroverride
id → String
Unique identifier for this request (used for matching with responses).
final
maxRedirects ↔ int
Set this property to the maximum number of redirects to follow when followRedirects is true. If this number is exceeded an error event will be added with a RedirectException.
getter/setter pairoverride
method → String
The method of the request.
no setteroverride
persistentConnection ↔ bool
The requested persistent connection state.
getter/setter pairoverride
request → HttpClientRequest
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stream → Stream<List<int>>
Exposes the broadcast stream of body data chunks.
no setter
uri → Uri
The uri of the request.
no setteroverride

Methods

abort([Object? exception, StackTrace? stackTrace]) → void
TODO: Implement abort logic if needed.
override
add(List<int> data) → void
Adds bytes to the request body, forwarding to both the underlying request and the internal stream controller for tracking.
override
addError(Object error, [StackTrace? stackTrace]) → void
Passes the error to the target consumer as an error event.
override
addStream(Stream<List<int>> stream) → Future<void>
Adds a stream of byte chunks to the request body.
override
close() → Future<HttpClientResponse>
Completes the request and intercepts the response.
override
flush() → Future<void>
Returns a Future that completes once all buffered data is accepted by the underlying StreamConsumer.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
write(Object? obj) → void
Converts object to a String by invoking Object.toString and adds the encoding of the result to the target consumer.
override
writeAll(Iterable objects, [String separator = ""]) → void
Iterates over the given objects and writes them in sequence.
override
writeCharCode(int charCode) → void
Writes the character of charCode.
override
writeln([Object? obj = ""]) → void
Converts object to a String by invoking Object.toString and writes the result to this, followed by a newline.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited