我正在从Angular 7进行服务呼叫。
depr <- data.table::fread('
Depr Sex Age GL YR Pop
0 Both 00-04 ON 2011 395
0 Both 00-04 ON 2016 5550
1 Both 00-04 ON 2011 495
1 Both 00-04 ON 2016 3923
', data.table = F)
'params'的console.log
search(params) {
let url = 'https://thisapp.com/api/search.php';
return this.http.post(url, params);
}
没有将'params'读取到实时服务器上我的脚本的$ _POST变量中。在Postman或我本地的开发环境中,它们确实可以正确显示。
{keywords: "riches", recent: "false", magic: ["fun"] }
在邮递员中:
<?php
var_dump($_POST); exit;
--- the rest of the code ---
?>
实时服务器:
array(3) {
["keywords"]=>string(6) "riches"
["recent"]=>string(5) "false"
["magic"]=>array(1) {
[0]=>string(3) "fun"
}
}
因此它没有以$ _POST数组的形式接收数据。我在想带有标题的东西...