wp\\u remote\\u get导致问题,并切换到curl解决方案。
以下代码替换了我的旧解决方案:
$serverIP = \'x.x.x.x\';
$serviceAPI = \'/Get_VacationRequest\';
$jsonData = urlencode(json_encode($_REQUEST));
// Set up the server information where we will consume the API
$url = \'http://\' . $serverIP . $serviceAPI . \'?name=\' . $jsonData;
// Start the curl session
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
curl_close($curl);