Selam
php için
        $url = "localhost/send";
        $headers = [ 'Content-Type: application/json; Cache-Control: no-cache' ];
        $POST = [ 'param1' => $value1, 'param2' => $value2];                    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($POST));
        $response   = curl_exec($ch);
node.js için xhr kütüphanesini çağırın
       var XMLHttpRequest = require('xhr2');
        var xhr = new XMLHttpRequest();
        var url = "localhost/send";
        xhr.open("POST", url, true);
        xhr.setRequestHeader("Content-Type", "application/json", "Cache-Control", "no-cache");

        var datab = JSON.stringify({
            "ad": 'ahmet',
            "soyad": 'mehmet'
        });