超时设置

    1. <?php
    2. $http = HttpRequest::newSession();
    3. $response = $http->timeout(3000, 1000) // 总时间不得超过3秒,连接时间不得超过1秒
    4. ->get('https://www.baidu.com/');
    5. $content = $response->body(); // 网页源码