Skip to content

Commit

Permalink
bugfix:处理请求异常: DioError [DioErrorType.other]: type 'Null' is not a su…
Browse files Browse the repository at this point in the history
…btype of type 'Object'
  • Loading branch information
congyiming committed Mar 21, 2021
1 parent 5af2645 commit 9d8bd68
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/common/net/interceptors/log_interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class LogsInterceptors extends InterceptorsWrapper {
onRequest(RequestOptions options) async {
if (Config.DEBUG!) {
print("请求url:${options.path} ${options.method}");
options.headers.forEach((k, v) => options.headers[k] = v ?? "");
print('请求头: ' + options.headers.toString());
if (options.data != null) {
print('请求参数: ' + options.data.toString());
Expand Down

0 comments on commit 9d8bd68

Please sign in to comment.