Yes, I am creating custom JavaScript. And I just wanted to force the response from server to have my structure. Nothing default from NetTalk.
But, I have figure it out if I send in the request that ajax=1, instead 0, response is much smaller. And my text is in the beginning of the response. So I have modified code:
try {
const response = await fetch("/Link?" + params, {
method: "GET",
});
const text = await response.text();
const value = parseInt(text.slice(0, 1), 10);
return value;
} catch (e) {
console.info("Error GET /Link:", e);
return null;
}
With this, there is still some overhead, but is much smaller.