在Fastify中覆盖HTTP方法

问题描述

我正在使用fastify和TypeScript在节点中创建一个CRUD应用程序。如何覆盖html表单中的rest方法?

例如在HTML中:

<form action="/removeproduct" method="DELETE">
   <input type="text" name="productname" />
</form>

在节点中固定代码:

app.delete('/removeproduct',(request,reply) => {
  // code to remove a product from db
})

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)