logNetworkRequest method
void
logNetworkRequest({
- required String url,
- required HttpMethod method,
- required int startTime,
- required int endTime,
- required int bytesSent,
- required int bytesReceived,
- required int statusCode,
- String? error,
- String? traceId,
override
Log a network request.
Use the error
parameter to pass the reason phrase or exception message
for requests that are not successful.
Implementation
@override
void logNetworkRequest({
required String url,
required HttpMethod method,
required int startTime,
required int endTime,
required int bytesSent,
required int bytesReceived,
required int statusCode,
String? error,
String? traceId,
}) {
throwIfNotStarted();
methodChannel.invokeMethod(_logNetworkRequestMethodName, {
_urlArgName: url,
_httpMethodArgName: method.toHttpString().toLowerCase(),
_startTimeArgName: startTime,
_endTimeArgName: endTime,
_bytesSentArgName: bytesSent,
_bytesReceivedArgName: bytesReceived,
_statusCodeArgName: statusCode,
_errorArgName: error,
_traceIdArgName: traceId,
});
}