I'm using nodejs to send http request to a server, and get http response from it(the http response body is encrypted, while the http header is normal). The response body will be written to a file. But I find the response body is different from what the server sent.
This is what I've done:
request.post({
headers: {'content-type':'application/json'},
url:'url-to-server',
body:data-to-send
}, function(error, response, body){
if(!error && response.statusCode==200){
fs.writeFile(path-to-file,body,function(err){
});
}
});
The problem is, some byte values are replaced by ef bf bd
Server Send: f5 cb b6 48 77 b6 26 6a d2 4c d8 d9 ... Received data: ef bf bd cb b6 48 77 ef bf bd 26 6a ...
Any ideas?