egg_server/test/insertSheet.ts
zhaoyingbo 61919e0155
All checks were successful
Egg CI/CD / build-image (push) Successful in 29s
Egg CI/CD / deploy (push) Successful in 20s
feat: 修复插入表格数据时的错误处理问题
2024-07-12 11:19:59 +00:00

16 lines
386 B
TypeScript

// const URL = "https://egg.imoaix.cn/sheet";
const URL = "http://localhost:3000/sheet";
const res = await fetch(URL, {
method: "POST",
body: JSON.stringify({
api_key: "uwnpzb9hvoft28h",
sheet_token: "shtk48HuiHQOUSTAZ0t0DFplNJc",
type: "insert",
range: "a2YJxa",
values: [["hello", "world"]],
}),
});
console.log(JSON.stringify(await res.json(), null, 2));