1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export async function test() {
const { default: axios } = await import("npm:axios");
const url = "http://207.244.232.58:8011/api/login";
const message = "testing";
const loginInfo = {
username: "HAZAH",
password: "HAZAHisOP1!",
};
try {
const response = await axios.post(url, loginInfo);
const data = response.json();
console.log("test");
console.log(data);
return true;
}
catch (error) {
console.log(error);
return false;
}
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
December 16, 2023