Skip to content

用户接口 ​

这是一份 API 文档示例页面,演示代码块高亮。

GET /api/user/:id ​

获取单个用户。

路径参数

参数类型说明
idstring用户 ID

响应示例

json
{
  "id": "u_1001",
  "name": "Alice",
  "email": "alice@example.com"
}

POST /api/user ​

创建用户。

bash
curl -X POST https://api.example.com/user \
  -H "Content-Type: application/json" \
  -d '{"name":"Bob","email":"bob@example.com"}'

Released under the MIT License.