mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 07:50:25 +00:00
fix
This commit is contained in:
17
src/common/utils/request.ts
Normal file
17
src/common/utils/request.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
const https = require('node:https');
|
||||
export async function HttpGetWithCookies(url: string) {
|
||||
const req = https.get(url, (res: any) => {
|
||||
res.on('data', (data: any) => {
|
||||
});
|
||||
res.on('end', () => {
|
||||
const responseCookies = res.headers['set-cookie'];
|
||||
console.log('获取到的 cookies:', responseCookies);
|
||||
console.log(res.headers)
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', (error: any) => {
|
||||
// console.log(error)
|
||||
})
|
||||
req.end()
|
||||
}
|
||||
Reference in New Issue
Block a user