ToolHub
中文
Light
GitHub
返回首页
/
开发编程
/
HTTP 请求构建器
加载中...
GET
POST
PUT
PATCH
DELETE
请求头
添加请求头
请求体
{ "name": "ToolHub", "published": true }
方法
POST
请求头数量
2
Body 字节数
44
fetch
复制
const response = await fetch("https://api.example.com/v1/tools", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer demo-token", }, body: "{\n \"name\": \"ToolHub\",\n \"published\": true\n}", }); const result = await response.json(); console.log(result);
cURL
复制
curl "https://api.example.com/v1/tools" \ -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer demo-token" \ --data-raw "{\n \"name\": \"ToolHub\",\n \"published\": true\n}" \
Mock 响应
复制
{ "request": { "method": "POST", "url": "https://api.example.com/v1/tools", "headers": { "Content-Type": "application/json", "Authorization": "Bearer demo-token" }, "body": "{\n \"name\": \"ToolHub\",\n \"published\": true\n}" }, "response": { "status": 200, "message": "ok", "data": { "id": "demo_123", "receivedAt": "2026-05-22T08:34:17.264Z" } } }