How to output the results of request.post in Node.JS to the browser? Using res.write () will report an error!

the following is a request code. I need to send the cleartext information to the browser.
I know that using res.write () can be output to the browser. But what should I do if I report an error?

request.post({url:ajaxurlip + url, form: {"req":ciphertext}}, function(error,response,body){
            if (!error && response.statusCode == 200) {
                var resp = JSON.parse(body);
                if(resp.status == 0) {
                    var cleartext = CryptoJS.AES.decrypt(
                        resp.body,
                        CryptoJS.enc.Utf8.parse(myAES), {
                            iv: "",
                            mode: CryptoJS.mode.ECB
                        }
                       );
                       //  cleartext 
                       cleartext = JSON.parse(CryptoJS.enc.Utf8.stringify(cleartext));
                       
                       
                       res.write(cleartext)  //
                       
                }
            }
        })
Mar.03,2021

res.write (cleartext) replace with res.send (cleartext) try

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ae7e-2c27c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ae7e-2c27c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?