@deot/http
v1.1.6
Published
自动选择`Browser`和`Node`环境
Downloads
1
Readme
@deot/http
自动选择Browser
和Node
环境
import { createInstance, Network } from '@deot/http';
await Network.http(`https://xxx.com/api.json`);
await Network.http({
url: `https://xxx.com/api.json`
});
// cancel 1
const leaf = Network.http(`https://xxx.com/api.json`);
await leaf.cancel();
// cancel 2
const shell = Network.custom(`https://xxx.com/api.json`);
shell.send();
await shell.cancel();
所有api
与@deot/http-core
一致,可忽略provider
实现细节