HttpUtils.ets 453 Bytes
import { HttpRequest } from '../http/HttpRequest';

const TAG: string = '[HttpUtils]'

export class HttpUtils {
  /**
   * 添加公共参数,如登录后,添加登录信息
   */
  static addCommonHeader() {
    HttpRequest.addGlobalHeaderProvider(() => {
      let headers: Record<string, string> = {};
      return headers;
    })
  }

  /**
   * 添加公共参数,如登出后,移除登录信息
   */
  static removeCommonHeader() {

  }
}