接上文[《[axios] axios中get請求的發送》](https://segmentfault.com/a/1190000043982778)
針對post請求,建議下面這兩種
1、axios(config) (建議使用)
舉例:
axios({
method: 'post',
url: '/fund/info',
data: {
fundId: "000001",
type: "bond"
}
});
2、axios.post(url[, data[, config]])
舉例:
axios.post('/fund/info',
{
fundId: "000001",
type: "bond"
},
{
headers: {
"Content-Type": "application/json"
}
timeout: 8000
}
);
同步更新到自己的語雀
https://www.yuque.com/dirackeeko/blog/fnow4fot1epk5snc