swoole / rfc

Swoole 提案
116 stars 3 forks source link

RFC-1020: Http\Client 支持 setBasicAuth #51

Closed matyhtf closed 5 years ago

matyhtf commented 5 years ago

预期目标

底层实现HTTP Basic auth,应用层可直接使用,不需要自行计算。

代码

$client = new Co\Http\Client("127.0.0.1", 80);
$client->setBasicAuth("username", "password");
$client->get("/");