<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## 響應 響應組件用來將控制器返回的數據、設置的HTTP報頭發送至客戶端,基于 [PSR-7](https://www.php-fig.org/psr/psr-7/) / [PSR-17](https://www.php-fig.org/psr/psr-17/) 標準實現。 ## 組件 使用 [composer]([https://www.phpcomposer.com/](https://www.phpcomposer.com/)) 安裝: ~~~ composer require mix/http-message ~~~ ## 來源 請求類定義于 `mix/http-message` 庫,由 `mix/http-server` 的 `HandlerInterface::handleHTTP` 方法中獲取,最終會傳遞到控制器的構造方法與調用方法中。 - [Router.php#L210](https://github.com/mix-php/route/blob/master/src/Router.php#L210) - [IndexController.php#L17](https://github.com/mix-php/mix-skeleton/tree/v2.1/app/Web/Controllers/IndexController.php#L17) ## PSR 定義方法 | 方法 | 描述 | | --- | --- | | withHeader($name, $value) | 設置header | | withAddedHeader($name, $value) | header追加值 | | withoutHeader($name) | 移除header | | withBody(StreamInterface $body) | 設置主體 | | withStatus($code, $reasonPhrase = '') | 設置狀態碼 | - Sample 1 ``` $body = (new StreamFactory())->createStream($content); $response ->withContentType('text/html', 'utf-8') ->withBody($body); ``` ## 特有方法 | 方法 | 描述 | | --- | --- | | withCookies(array $cookies) | 批量設置cookie | | withCookie(Cookie $cookie) | 設置cookie | | withContentType(string $type, string $charset = '') | 設置ContentType | | redirect(string $url, int $status = 302) | 重定向 | | end() | 發送結果,并結束請求處理 | - Sample 1 ``` $cookie = (new CookieFactory())->createCookie($name, $value, $expire); $response->withCookie($cookie); ```
                  <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>

                              哎呀哎呀视频在线观看