360 Secure SkillHub
360 安全技能中心

http-requests-1.0.0

该 Skill 提供 scripts/request_http.py,用 Python requests 发送 GET、POST、PUT、DELETE 请求,支持请求头、查询参数、JSON 请求体、表单数据和超时设置;在技能目录的 logs/ 下写入每日 JSONL 轻量日志,不记录令牌、Cookie 或完整请求/响应体。复杂请求场景参考 references/usage-patterns.md。

pumpkinttl
pumpkinttl
热度 37.38
最近更新 2026-05-11 17:40:25
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:API 集成 / 自动化脚本 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add httprequests
Metadata
name
http-requests
description
Send HTTP requests with Python requests instead of curl when quoting and escaping would be error-prone. Use for GET, POST, PUT, DELETE requests with headers, query params, JSON body, form data, timeout control, and concise response inspection. Triggers on phrases like "调用这个 API", "发 GET 请求", "发 POST 请求", "请求这个接口", "带 header 调接口", "用 requests 代替 curl", "测试 webhook", or "看接口返回了什么".

HTTP Requests

Use this skill when an HTTP API call is needed and curl quoting/escaping would be fragile.

What this skill does

  • Sends HTTP requests via Python requests
  • Supports GET, POST, PUT, DELETE
  • Supports headers, query params, JSON body, form data, and timeout
  • Writes a light daily JSONL log under logs/
  • Avoids logging sensitive values like authorization tokens and full bodies

Inputs to collect

Before running the script, gather:

  • Method: GET / POST / PUT / DELETE
  • URL
  • Headers if any
  • Query params if any
  • JSON body or form data if any
  • Timeout if the user cares (otherwise use default)

Script

Primary script:

  • scripts/request_http.py

Run it with Python and pass method/url plus optional inputs.

Logging

Logs are stored inside this skill directory:

  • logs/YYYY-MM-DD.jsonl

Each line contains a light summary only:

  • timestamp
  • method
  • url
  • status
  • ok
  • duration_ms
  • response_bytes
  • error (if any)

Do not log authorization tokens, cookies, or full request/response bodies by default.

When to read references

Read references/usage-patterns.md when:

  • the request has multiple headers/params/body fields
  • the user wants an example pattern
  • you need to choose between JSON body and form data
  • you need the expected command-line argument style for the script