![](/img/trans.png)
[英]jQuery cannot understand JSON response when Content-Type is not set to “application/json”
[英]Can HTTP response body be empty when response header 'Content-Type' is set to 'application/json'?
根據規范是否允許這樣做,還是必須返回有效的JSON( []
或{}
)?
有效JSON(RFC 7159)可能只是JS值(請參閱https://greenbytes.de/tech/webdav/rfc7159.html#values )。
但是不會,根據媒體類型,空的有效負載將無效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.