adding res.on('end') in order to receive all chunks of the body on data callback