setHeader method

dynamic setHeader(
  1. Map<String, String> params
)

设置公共请求头

Implementation

setHeader(Map<String, String> params) {
  _dio.options.headers.addAll(params);
  print('YmHttp 设置Header: ' + _dio.options.headers.toString());
}