How to send POST requests with array properties (Ionic 2 HTTP plugin)?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In one of my Ionic 2 projects I need to send a POST request to a server with a JSON body that looks like this: var body = { "prop" : 1, "prop2" : "Test", "prop3": [{ "id" : "1", "qty": 1, "details": "Test" }] } I am using the following code to call the server using the native HTTP plugin (1.2.0) in Android: http.post(url, body, {}).then(function() { ... }) But my server is receiving the following: { "prop" : 1, "prop2" : "Test", "prop3": "[{ \"id\" : \"1\", \"qty\": 1, \"details\": \"Test\" }]" } As you can see, the array property "prop3" is