mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
improve network log
This commit is contained in:
@@ -196,12 +196,6 @@ class AppDio with DioMixin {
|
|||||||
: rhttp.ProxySettings.proxy(proxy!),
|
: rhttp.ProxySettings.proxy(proxy!),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
Log.info(
|
|
||||||
"Network",
|
|
||||||
"${options?.method ?? 'GET'} $path\n"
|
|
||||||
"Headers: ${options?.headers}\n"
|
|
||||||
"Data: $data\n",
|
|
||||||
);
|
|
||||||
return super.request(
|
return super.request(
|
||||||
path,
|
path,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -238,6 +232,12 @@ class RHttpAdapter implements HttpClientAdapter {
|
|||||||
Stream<Uint8List>? requestStream,
|
Stream<Uint8List>? requestStream,
|
||||||
Future<void>? cancelFuture,
|
Future<void>? cancelFuture,
|
||||||
) async {
|
) async {
|
||||||
|
Log.info(
|
||||||
|
"Network",
|
||||||
|
"${options.method} ${options.uri}\n"
|
||||||
|
"Headers: ${options.headers}\n"
|
||||||
|
"Data: ${options.data}\n",
|
||||||
|
);
|
||||||
var res = await rhttp.Rhttp.request(
|
var res = await rhttp.Rhttp.request(
|
||||||
method: switch (options.method) {
|
method: switch (options.method) {
|
||||||
'GET' => rhttp.HttpMethod.get,
|
'GET' => rhttp.HttpMethod.get,
|
||||||
|
Reference in New Issue
Block a user