Closed cnxuyc closed 7 years ago
if (ctx.req.method === 'POST') { body = await Parse(ctx) } **const query = ctx.request.querystring** const payload = { request$: ctx.request, response$: ctx.response, args: {body, query} }
req:http://127.0.0.1:3000/todo/edit?left=1&right=2 return:left=1&right=2
if (ctx.req.method === 'POST') { body = await Parse(ctx) } **const query = ctx.request.query** const payload = { request$: ctx.request, response$: ctx.response, args: {body, query} }
req:http://127.0.0.1:3000/todo/edit?left=1&right=2 return:{ left: '1', right: '2' }
Good call, I'll fix that.
This is in v1.0.5
req:http://127.0.0.1:3000/todo/edit?left=1&right=2 return:left=1&right=2
req:http://127.0.0.1:3000/todo/edit?left=1&right=2 return:{ left: '1', right: '2' }