<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## Guzzle 支持 Swoole 協程的 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest) , 可 Hook 第三方庫 ## 組件 使用 [composer]([https://www.phpcomposer.com/](https://www.phpcomposer.com/)) 安裝: ~~~ composer require mix/guzzle ~~~ ## 依賴注入配置 - [manifest/beans/guzzle.php](https://github.com/mix-php/mix-skeleton/blob/master/manifest/beans/guzzle.php) ## 使用 根據 `Guzzle` 官方文檔使用即可: ```php $client = new \GuzzleHttp\Client(); $response = $client->get('https://www.baidu.com/'); ``` 也可以手動指定 `handler` 如下: ```php $handler = new \Mix\Guzzle\Handler\StreamHandler(); $stack = \GuzzleHttp\HandlerStack::create($handler); $client = new \GuzzleHttp\Client([ 'handler' => $stack, ]); ``` ## 原理 因為 Swoole 的 Hook 只支持 PHP Stream,Guzzle 庫默認是使用 CURL 擴展,而 Swoole 不支持在協程中使用 CURL,因此本庫將 Guzzle 默認的 CurlHandler 替換為 StreamHandler,并做了一些協程優化處理,讓依賴 Guzzle 的第三方庫無需修改代碼即可使用 Swoole 協程。 ## 支持的第三方庫 理論上基于 Guzzle 庫開發的 SDK 都可使用本庫 Hook,下面是已知的支持 Hook 的第三方庫清單: - [alibabacloud/client](https://github.com/aliyun/openapi-sdk-php-client) - [TencentCloud/tencentcloud-sdk-php](https://github.com/TencentCloud/tencentcloud-sdk-php)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看