StethoHttpOverrides class
Custom HttpOverrides that wraps the default HttpClient with StethoHttpClient to enable HTTP request/response inspection.
It supports optionally overriding:
- How the proxy is selected via findProxyFromEnvironmentFn.
- How the underlying HttpClient is created via createHttpClientFn.
- Inheritance
-
- Object
- HttpOverrides
- StethoHttpOverrides
Constructors
-
StethoHttpOverrides.new({String findProxyFromEnvironmentFn(Uri url, Map<
String, String> ? environment)?, HttpClient createHttpClientFn(SecurityContext? context)?}) - Constructs a StethoHttpOverrides with optional hooks for proxy selection and client creation.
Properties
- createHttpClientFn → HttpClient Function(SecurityContext? context)?
-
Optional custom function to create an HttpClient instance,
allowing full customization or decorating of the client.
final
-
findProxyFromEnvironmentFn
→ String Function(Uri url, Map<
String, String> ? environment)? -
Optional custom function to determine the proxy based on URL and environment.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createHttpClient(
SecurityContext? context) → HttpClient -
Returns a new HttpClient using the given
context
.override -
findProxyFromEnvironment(
Uri url, Map< String, String> ? environment) → String -
Resolves the proxy server to be used for HTTP connections.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited