HttpClientLogAdapter class

An "dart:io" HttpClient adapter that logs requests to a HttpBucket.

Usage:

httpClientAdapter = HttpClientLogAdapter(MyApp.httpBucket);

try {
  // Log request
  httpClientAdapter.onRequest(request);
  // Log response
  httpClientAdapter.onResponse(request, response, responseBody);
} catch (e, stack) {
  // Log error
  httpClientAdapter.onError(request, e, stack);
}

Constructors

HttpClientLogAdapter(HttpBucket httpBucket)

Properties

hashCode int
The hash code for this object.
no setterinherited
httpBucket HttpBucket
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

convertError([Object? e, StackTrace? stack]) HttpError
convertRequest(HttpClientRequest request, [Object? body]) HttpRequest
convertResponse(HttpClientResponse response, [Object? body]) HttpResponse
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(HttpClientRequest request, [Object? error, StackTrace? stack]) → void
onRequest(HttpClientRequest request, [Object? body]) → void
onResponse(HttpClientRequest request, HttpClientResponse response, [Object? body]) → void
toString() String
A string representation of this object.
inherited

Operators

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