16 lines
369 B
TypeScript

// const URL = "https://egg.imoaix.cn/message";
const URL = "http://localhost:3000/message"
const res = await fetch(URL, {
method: "POST",
body: JSON.stringify({
api_key: "uwnpzb9hvoft28h",
receive_id: "zhaoyingbo",
receive_id_type: "user_id",
msg_type: "text",
content: "hello, world!",
}),
})
console.log(JSON.stringify(await res.text()))