网络:contentType,dataType,Accept区别
来源:互联网 发布:淘宝卖明星周边违法吗 编辑:程序博客网 时间:2024/06/01 09:04
ContentType
When sending data to the server, use this content type.
Default is “application/x-www-form-urlencoded;
DataType
The type of data that you’re expecting back from the server.
If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string).
Accept
accepts (default: depends on DataType) Type: PlainObject The content type sent in the request header that*** tells the server what kind of response it will accept in return.*
总结
- contentType: 告诉服务器,我要发什么类型的数据
- dataType:告诉服务器,我要想什么类型的数据,如果没有指定,那么会自动推断是返回 XML,还是JSON,还是script,还是String。
- Accept:告诉服务器,能接受什么类型。
参考
- DataType vs ContentType in jquery ajax [duplicate]
- dataType vs accepts - Ajax Request
0 1
- 网络:contentType,dataType,Accept区别
- ajax请求中contentType与dataType区别
- ajax请求中contentType与dataType区别
- ajax中的contentType和dataType
- ajax请求中contentType与dataType含义
- DataType vs ContentType in jquery ajax [duplicate] 数据类型
- pageEncoding和ContentType区别
- pageEncoding contentType区别
- contentType 与pageEncoding区别
- 网络编程-accept函数
- connect 和accept区别
- 网络请求------ContentType(类型) 集合
- C++ tcp/ip网络编程中listen函数和accept函数详解和区别
- pageEncoding和contentType的区别
- PageEncoding和ContentType的区别
- JSP:contentType 与pageEncoding区别
- pageEncoding和contentType的区别
- pageEncoding和contentType的区别
- MFC学习笔记之二(制作人物动画+人物移动+地图拖曳)
- WPA-PSK无线网络破解原理与过程
- unix like编程中的signal()函数
- Perfect Squares
- 如何与程序猿谈一场没有Bug的恋爱
- 网络:contentType,dataType,Accept区别
- Exploit FFmpeg Libraries to Decode Raw H264 File in Windows, Which Supports Multithread-Decoding
- 关于异步跨域请求数据
- cocos2dx学习之路----第六篇(cocos2dx坐标系系统简单窥视)
- Codeforces 629D Babaei and Birthday Cake(DP)
- 一小时自学吉他
- 计算机网络面试题汇总
- 异常 EventBusException:its super classes have no public methods with the @Subscribe annotation
- [python爬虫] Selenium爬取新浪微博内容及用户信息