include "./vendor/autoload.php";
go(function () {
    $client = new \EasySwoole\HttpClient\HttpClient();
    $client->setUrl('');//Setting url, note that HTTP and HTTPS are required, HTTPS requires swoole extension to open SSL
    $response = $client->exec();
    var_dump($response->getBody());//Get the response body
    var_dump($response->getErrCode());//Get the error code
    var_dump($response->getErrMsg());//Get the error message
    var_dump($response->getStatusCode());//Get the reponse status code
    var_dump($response->getCookiesRaw());//Get the cookie that the response header wants to set
    var_dump($response->getCookies());//Get the cookie you sent and the cookie you want to set in the response header

0 results matching ""

    No results matching ""