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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 如何獲取query參數 routes/index.js ```javascript var router = require('koa-router')(); router.get('/', function *(next) { console.log(this.request.query) console.log(this.query) yield this.render('index', { title: 'Hello World Koa!' }); }); module.exports = router; ``` 訪問http://127.0.0.1:3000/?a=1 日志 ``` <-- GET /?a=1 { a: '1' } { a: '1' } ``` 和express里獲取query的方法是一樣的,req.query koa里是 - this.request.query - this.query 這里需要說明以下this上下文上有request和response2個對象,每次寫起來又比較麻煩 于是把request和response上的方法也丟給this,這樣就相當于this上有了對應request和response里的方法的別名(簡寫方式) - 別名列表 Request aliases 以下訪問器和別名與 Request 等價: - ctx.header - ctx.method - ctx.method= - ctx.url - ctx.url= - ctx.originalUrl - ctx.path - ctx.path= - ctx.query - ctx.query= - ctx.querystring - ctx.querystring= - ctx.host - ctx.hostname - ctx.fresh - ctx.stale - ctx.socket - ctx.protocol - ctx.secure - ctx.ip - ctx.ips - ctx.subdomains - ctx.is() - ctx.accepts() - ctx.acceptsEncodings() - ctx.acceptsCharsets() - ctx.acceptsLanguages() - ctx.get() Response aliases 以下訪問器和別名與 Response 等價: - ctx.body - ctx.body= - ctx.status - ctx.status= - ctx.length= - ctx.length - ctx.type= - ctx.type - ctx.headerSent - ctx.redirect() - ctx.attachment() - ctx.set() - ctx.remove() - ctx.lastModified= - ctx.etag=
                  <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>

                              哎呀哎呀视频在线观看