HTTP 请求方法
📋 HTTP 的 GET/POST/PUT/DELETE 等方法,r0capture 抓到的明文里直接可见。
常见方法
| 方法 | 用途 | r0capture 抓到的样子 |
|---|---|---|
| GET | 获取资源 | GET /api/user?id=1 HTTP/1.1 |
| POST | 提交数据 | POST /api/login HTTP/1.1 + body |
| PUT | 更新资源 | PUT /api/user/1 HTTP/1.1 + body |
| DELETE | 删除资源 | DELETE /api/user/1 HTTP/1.1 |
| PATCH | 部分更新 | PATCH /api/user/1 HTTP/1.1 + body |
| OPTIONS | 预检(CORS) | OPTIONS /api/... HTTP/1.1 |
| HEAD | 只取头 | HEAD /api/... HTTP/1.1 |
在 r0capture 里的识别
请求行在 SSL_write 抓到的明文第一行:
[SSL_write] 192.168.1.5:54321 --> api.app.com:443
POST /api/login HTTP/1.1 ← 方法 POST
Host: api.app.com
Content-Type: application/json
{"username":"alice"}请求体
- GET:通常无 body(参数在 URL)
- POST/PUT/PATCH:有 body(在
Content-Type指定格式)
body 紧跟在请求头空行后,r0capture 一并抓到。
响应
SSL_read 抓到的响应第一行是状态行:
[SSL_read] api.app.com:443 --> 192.168.1.5:54321
HTTP/1.1 200 OK ← 状态码 200
Content-Type: application/json
{"id":123}