a
Some checks failed
test / Run tests (push) Failing after 13s
build / Build (push) Failing after 13s
Some checks failed
test / Run tests (push) Failing after 13s
build / Build (push) Failing after 13s
This commit is contained in:
@ -3,13 +3,17 @@ import { Group } from "@Packages/message/server";
|
||||
export class GMApi {
|
||||
constructor(private group: Group) {}
|
||||
|
||||
xmlHttpRequest(){
|
||||
|
||||
xmlHttpRequest(params: GMSend.XHRDetails) {
|
||||
console.log(params);
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open(params.method || "GET", params.url);
|
||||
xhr.onload = function () {
|
||||
console.log(xhr, xhr.getAllResponseHeaders());
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.group.on("xmlHttpRequest", async (data) => {
|
||||
console.log(data);
|
||||
});
|
||||
this.group.on("xmlHttpRequest", this.xmlHttpRequest.bind(this));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user