我想知道为什么在 AngularJS 2 (2.0.0-beta.13) 中,HTTP Post 方法只接受字符串数据作为正文,而不像 AngularJS 1 中那样接受 JavaScript 对象。
AngularJS-1:
$http.post(someUrl,someObject)
AngularJS-2:
http.post(someUrl, JSON.stringify(someObject))
谢谢
最佳答案
因为还没有实现对其他类型的支持https://github.com/angular/http/issues/75
关于javascript - 为什么 AngularJS 2 HTTP Post 只接受字符串数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37475951/