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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 請求幫助 Slim’s PSR-7 Request implementation provides these additional proprietary methods to help you further inspect the HTTP request. > Slim的PSR-7請求實現提供了這些額外的專有方法來幫助您進一步檢查HTTP請求。 ## Detect XHR requests 檢測XHR請求 You can detect XHR requests by checking if the header`X-Requested-With`is`XMLHttpRequest`using the Request’s`getHeaderLine()`method. > 您可以通過使用請求的 **getHeaderLine()** 方法檢查標題`X-Requested-With`是否為`XMLHttpRequest`來檢測XHR請求。 ~~~bash POST /path HTTP/1.1 Host: example.com Content-type: application/x-www-form-urlencoded Content-length: 7 X-Requested-With: XMLHttpRequest foo=bar ~~~ Figure 13: Example XHR request. ~~~php if ($request->getHeaderLine('X-Requested-With') === 'XMLHttpRequest') { // Do something } ~~~ ## Content Type You can fetch the HTTP request content type with the Request object’s`getHeaderLine()`method. > 您可以使用請求對象的 **getHeaderLine()** 方法獲取HTTP請求內容類型。 ~~~php $contentType = $request->getHeaderLine('Content-Type'); ~~~ ## Content Length You can fetch the HTTP request content length with the Request object’s`getHeaderLine()`method. > 您可以使用請求對象的 **getHeaderLine()** 方法獲取HTTP請求內容長度。 ~~~php $length = $request->getHeaderLine('Content-Length'); ~~~ ## Request Parameter To fetch single request parameter value. You will need to use `getServerParams()` > 獲取單個請求參數值。您將需要使用 **getServerParams()** For example, to get a single Server Parameter: ~~~php $params = $request->getServerParams(); $authorization = isset($params['HTTP_AUTHORIZATION']) : $params['HTTP_AUTHORIZATION'] : null; ~~~
                  <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>

                              哎呀哎呀视频在线观看