anqin / httpcurl
curl class for thinkphp6
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/anqin/httpcurl
Requires
- php: >=7.3
- ext-curl: *
- topthink/framework: ^6.0.0
This package is auto-updated.
Last update: 2025-09-15 18:21:55 UTC
README
安装
composer require anqin/httpcurl
使用
该库暂不支持文件提交
$http = new HttpCurl();
$resp = $http->get('https://www.baidu.com')->exec();
$resp = $http->post('https://www.baidu.com',['aaa'=>'bbb'])->exec();
$resp->toString(); //返回字符串
$resp->toArray(); //返回数组
$resp->close();//释放内存,防止内存泄漏