|
Zhamao Framework 3.2.4
A high-performance chatbot + web framework
|
静态 Public 成员函数 | |
| static | get (string|UriInterface|\Stringable $url, array $headers=[], array $config=[], bool $only_body=true) |
| static | post (string|UriInterface|\Stringable $url, array $header, mixed $data, array $config=[], bool $only_body=true) |
|
static |
快速发起一个 GET 请求
| string | \Stringable | UriInterface | $url | 请求地址 |
| array | $headers | 请求头 |
| array | $config | 传入参数 |
| bool | $only_body | 是否只返回 Response 的 body 部分,默认为 True |
|
static |
快速发起一个 POST 请求
| string | \Stringable | UriInterface | $url | 请求地址 |
| array | $header | 请求头 |
| mixed | $data | 请求数据,当传入了一个可以 Json 化的对象时,自动 json_encode,其他情况须传入可字符串化的变量 |
| array | $config | 传入参数 |
| bool | $only_body | 是否只返回 Response 的 body 部分,默认为 True |