跳到主要内容

request

执行底层 HTTP 请求

声明

mixed request(string method, string path, mixed body = nil, map headers = nil, int content_type = "Content_Type.json")

参数

参数名描述
methodHTTP 方法 (GET, POST, etc.)
path相对路径 (例如 "/bucket")
body请求体 (可选)
headers额外的请求头 (可选)
content_type请求体类型 (Content_Type.json, Content_Type.plain, Content_Type.stream)

返回值

mixed 解析后的 JSON 数据

使用方式

返回文档