javascript - Koa router: How to get query string params? -
i'm using koa-router.
how can request's query string params?
this best managed write:
import koarouter 'koa-router'; const router = koarouter({ prefix: '/courses' }); router.get('/', async (ctx) => { console.log(ctx.qs["lecturer"]); }); but qs undefined
any profoundly appreciated!
according docs there should ctx.request.query query string items represented object.
Comments
Post a Comment