vue-resource发送multipart/form-data数据
2024-10-19 19:39:34
//add headers
this.$http.post('/api', data, {
headers: {
'Content-Type': 'multipart/form-data'
}
}) //or send request data as application/x-www-form-urlencoded content type.
this.$http.post('/api', data, {
emulateJSON: true
}) //or use FormData
var formData = new FormData();
formData.append('foo', 'bar'); this.$http.post('/api', formData)
出处:https://github.com/pagekit/vue-resource/issues/267
最新文章
- 12.3 Arithmetic-software-
- 关于datatime 时间处理模块:
- 关于margin的问题
- Linux 学习笔记(一) 入门
- Winform开发框架中实现多种数据库类型切换以及分拆数据库的支持
- wpf 保存控件中的内容为图片格式
- C++常用的#include头文件总结
- OpenJudge/Poj 1915 Knight Moves
- LAMP网站架构方案分析
- [翻译]Go语言调度器
- Duanxx的STM32学习:NVIC操作
- maven入门(上)
- 修炼dp( 2 )
- 第45篇 js操作打开本地程序
- C#开发Open-Webkit-Sharp浏览器并支持前端alert显示
- 【译】9. Java反射——泛型
- Python 基于python实现单例模式
- json中获取key值
- JAVA中拆箱和装箱
- Oracle数据类型与.NET中的对应关系