为什么 AngularJS 2 HTTP Post 只接受字符串数据?
Why does AngularJS 2 HTTP Post only accepts string data?
我想知道为什么在 AngularJS 2 (2.0.0-beta.13) 中 HTTP Post 方法只接受字符串数据作为正文而不接受 JavaScript 对象AngularJS中的案例 1.
AngularJS-1:
$http.post(someUrl,someObject)
AngularJS-2:
http.post(someUrl, JSON.stringify(someObject))
谢谢
因为对其他类型的支持还没有实现https://github.com/angular/http/issues/75
我想知道为什么在 AngularJS 2 (2.0.0-beta.13) 中 HTTP Post 方法只接受字符串数据作为正文而不接受 JavaScript 对象AngularJS中的案例 1.
AngularJS-1:
$http.post(someUrl,someObject)
AngularJS-2:
http.post(someUrl, JSON.stringify(someObject))
谢谢
因为对其他类型的支持还没有实现https://github.com/angular/http/issues/75