Function fetch

  • 发起http请求

    Returns

    Http响应对象

    Parameters

    • url: string
    • Optional options: {
          body?: string;
          headers?: {
              [key: string]: string;
          };
          method?: "get" | "post" | "delete" | "put" | "head";
      }
      • Optional body?: string
      • Optional headers?: {
            [key: string]: string;
        }
        • [key: string]: string
      • Optional method?: "get" | "post" | "delete" | "put" | "head"

    Returns Promise<HttpResponse>