mirror of
https://github.com/labring/laf.git
synced 2026-01-18 16:03:17 +00:00
16 lines
355 B
Markdown
16 lines
355 B
Markdown
# HTTP 调用
|
|
|
|
云函数每个云函数都提供了 API 地址,理论上我们可以在任何能发起 http 请求的地方调用云函数。
|
|
|
|

|
|
|
|
下面是用 axios 请求云函数的简单示例。
|
|
|
|
```ts
|
|
const { data } = await axios({
|
|
url: "<FunctionURL>",
|
|
method: "get",
|
|
});
|
|
|
|
console.log(data);
|
|
``` |