POST 接口 三种文件数据接收
1.准备如下目录的文件
将 express ,multer 提前从npm超市导入 (multer 文件上传会用到)
index.html 内容如下:
<button id="btn_keyvalue"> post-传递普通键值对</button>
<hr />
<button id="btn_json"> post-传递json</button>
<hr />
<form id="myform">
<input type="text" name="title">
<input type="file" name="cover">
</form>
<button id="btn_formdata">post-传递formdata</button>
<hr