Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加abort controller 取消请求 #90

Merged
merged 1 commit into from
May 21, 2020

Conversation

suxin2017
Copy link
Contributor

umi-request cancel 的取消没有真正的取消

Demo 前端代码

Demo 服务端代码

var express = require("express");
var app = express();

app.get("/", function(req, res) {
  setTimeout(() => {
    res.send("Hello World!");
  }, 3000);
});

app.listen(3009, function() {
  console.log("Example app listening on port 3000!");
});

通过 AbortController 取消请求

通过AbortController的取消请求

通过 umi-request 内置取消请求

umi 默认的取消请求

@unrealsmart
Copy link

GET!

@chenjsh36 chenjsh36 merged commit 4522b07 into umijs:master May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants