Okay, I finally figured it out. I was trying to do a post from client side and not from server side. This post has been very helpful.
Also I was duplicating the router.get() for accepting the POST from client side. I found this stackoverflow answer and update the code as below. Now its responding to axios post ( 200 ) and next thing would be adding an api call from server.js file.
axios.post("/metafield",
{"metafield":{"namespace":"shop","key":"discount","value":"30%","value_type":"string"}},
options)
.then((response) => {
console.log(response);
}, (error) => {
console.log(error);
});
router.post('/metafield', verifyRequest(), async ctx => {
ctx.body = ctx.request.body;
ctx.res.statusCode = 200;
});
@chipkeyes88 @SBD Thanks for your time.