pls
This commit is contained in:
14
test_data/fetch-new.ts
Normal file
14
test_data/fetch-new.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
try {
|
||||
console.log(1);
|
||||
const response = fetch("https://httpbin.org/get");
|
||||
console.log(2);
|
||||
console.log(response);
|
||||
|
||||
console.log("OK:", response.ok);
|
||||
console.log("Status:", response.status);
|
||||
console.log("Body:", response.body);
|
||||
console.log("Content-Type:", response.headers["content-type"]);
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
console.log("exception");
|
||||
}
|
||||
Reference in New Issue
Block a user