ajax 参数出现在Request payload导致request.getParameter(name)是获取不到值
2021-06-22 18:05
标签:plain ack form common parse orm pair set ram 参考:http://stackoverflow.com/questions/10494574/what-is-the-difference-between-form-data-and-request-payload if a request (typically POST) has Content-type header set to application/x-www-form-urlencoded the body is expected to be in the form of a standard querystring with url-encoded key=value pairs joined by &. Form data section then shows the key-value parameters (when viewed parsed). This way was much more common in past because it is a default for HTML forms. other cases are shown in Request payload section (and nowadays parsed for readability as well for common formats like JSON). 如果请求的Content-Type设置为application/x-www-form-urlencoded,那么这个Post请求被认为是HTTP POST表单请求,参数出现在 其他情况如使用原生AJAX的POST请求如果不指定请求头Request Header,默认使用的Content-Type是text/plain;charset=UTF-8,参数出现在Request payload块。 ajax 参数出现在Request payload导致request.getParameter(name)是获取不到值 标签:plain ack form common parse orm pair set ram 原文地址:http://www.cnblogs.com/zhongzheng123/p/7169321.html
下一篇:Js 向表单中添加多个元素
文章标题:ajax 参数出现在Request payload导致request.getParameter(name)是获取不到值
文章链接:http://soscw.com/essay/97487.html