umi-request
umi-request copied to clipboard
A request tool based on fetch.
这里分享一下,我的做法(抛砖引玉): ``` ts import { ResponseError as UMIResponseError } from 'umi-request'; export class ResponseError extends Error implements UMIResponseError { public data: D; public response: Response; public request: { url: string;...
添加对上传文件的监听
umi-request是基于fetch的封装,当上传文件时,如何对上传文件的进度进行监听呢,像xhr.upload.onprogress
  结果返回值全是undefined  
import { message } from 'antd'; import { extend } from 'umi-request'; const errorHandler = function(error: any) { if (error.response) { if (error.response.status > 400) { message.error(error.data.message ? error.data.message :...
有个场景要用到stream类型,看了下文档好像没看到相关介绍
列表页编辑push到详情页, 然后详情页发起post请求,然后结束history.push返回列表页,然后,重复多次,项目爆了,异常卡顿
GET请求成功后,响应头Transfer-Encoding: chunked,服务器返回一个 chunk stream,每秒推送一个 JSON,umi-request可以处理吗?
Here's how I think about it: After a user's login, they have got two tokens (access and refresh) from the server. Before sending a request, if the access token is...
假如1秒之内同时有两个一样的请求发送,希望终止一个,怎么做到?有例子嘛?
怎么监听接口响应状态码  设置这个页没办法前端进行操作? 