更新时间:2023-02-25 16:41:30
您需要设置过程数据
到真
作为要发送的对象,这将需要被转换成一个查询字符串。
You need to set processData
to true
as you are sending an object which will need to be converted to a querystring.
从API:
过程数据
默认情况下,该数据选择通过为对象(从技术上讲,任何String之外)将被处理并转换成一个查询字符串数据,拟合到默认的内容类型应用程序/ x-WWW的形式urlen codeD。如果您想发送一个DOM文档,或其他非处理的数据,将此选项设置为false。
ProcessData
By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.