feat: use dom types and set Proxy global

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-02 01:56:45 +08:00
parent 84d9eb8881
commit 9b3d76b6dd
5 changed files with 6 additions and 7 deletions

View File

@@ -18,13 +18,13 @@ interface RequestConfig {
}
function request(config: RequestConfig) {
// @ts-ignore
let xhr = new XMLHttpRequest();
xhr.open(config.method, config.url, false);
for (const header in config.headers) {
xhr.setRequestHeader(header, config.headers[header]);
}
let future = xhr.send(config.data);
// @ts-ignore
return future.get();
}