<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之旅 廣告
                # 405 Not Allowed Handler If your Slim Framework application has a route that matches the current HTTP request URI?but NOT the HTTP request method, the application invokes its Not Allowed handler and returns a?`HTTP/1.1 405 Not Allowed`?response to the HTTP client. ## Default Not Allowed handler Each Slim Framework application has a default Not Allowed handler. This handler sets the Response status to?`405`, it sets the content type to?`text/html`, it adds a?`Allowed:`?HTTP header with a comma-delimited list of allowed HTTP methods, and it writes a simple explanation to the Response body. ## Custom Not Allowed handler A Slim Framework application’s Not Allowed handler is a Pimple service. You can substitute your own Not Allowed handler by defining a custom Pimple factory method with the application container. ~~~ // Create Slim $app = new \Slim\App(); // get the app's di-container $c = $app->getContainer(); $c['notAllowedHandler'] = function ($c) { return function ($request, $response, $methods) use ($c) { return $c['response'] ->withStatus(405) ->withHeader('Allow', implode(', ', $methods)) ->withHeader('Content-type', 'text/html') ->write('Method must be one of: ' . implode(', ', $methods)); }; ~~~ > N.B?Check out?[Not Found](http://www.slimframework.com/docs/handlers/not-found.html)?docs for pre-slim creation method using a new instance of`\Slim\Container` In this example, we define a new?`notAllowedHandler`?factory that returns a callable. The returned callable accepts three arguments: 1. A?`\Psr\Http\Message\ServerRequestInterface`?instance 2. A?`\Psr\Http\Message\ResponseInterface`?instance 3. A numeric array of allowed HTTP method names The callable?MUST?return an appropriate?`\Psr\Http\Message\ResponseInterface`?instance.
                  <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>

                              哎呀哎呀视频在线观看