request
执行底层 HTTP 请求
声明
mixed request(string method, string path, mixed body = nil, map headers = nil, int content_type = "Content_Type.json")
参数
| 参数名 | 描述 |
|---|---|
| method | HTTP 方法 (GET, POST, etc.) |
| path | 相对路径 (例如 "/bucket") |
| body | 请求体 (可选) |
| headers | 额外的请求头 (可选) |
| content_type | 请求体类型 (Content_Type.json, Content_Type.plain, Content_Type.stream) |
返回值
mixed 解析后的 JSON 数据