I want to get passed params in onRequest extension but I am always get null.. And I can get them when I want access them in other functions in my application,
The problem happen when I want to use them in onRequest extension I am using Hapi Js framework
Here is the code
const init = async function () { await server.register({ plugin: HapiOpenAPI, options: openAPIOptions, }); server.ext([ { type: "onRequest", method: async (request, h) => { RequestLogger.logRequest(request); let {params} = request; console.log('Params', params); return h.continue; }, }, ]); await server.start(); return server; }
1.4m articles
1.4m replys
5 comments
57.0k users