📦 HTML 存储服务

上传 HTML 并获取访问链接,有效期 3 天

📤 上传 HTML

📖 API 使用说明

1. 上传 HTML (方式一: JSON)

POST /upload
Content-Type: application/json

{
  "id": "my-page-123",
  "html": "<html>...</html>"
}

2. 上传 HTML (方式二: URL 参数)

POST /upload?id=my-page-123
Content-Type: text/html

<html>...</html>

3. 访问 HTML

GET /:id

例如: GET /my-page-123

📝 curl 示例

# 上传
curl -X POST https://your-worker.workers.dev/upload \
  -H "Content-Type: application/json" \
  -d '{"id":"test123","html":"<h1>Hello</h1>"}'

# 访问
curl https://your-worker.workers.dev/test123