I make fetch to server:
reader.onload = async function (e) {
(...)
await fetch('/processImg', {
method: 'GET',
}).then(function (res) {
console.log(res.text());
})
}).then(function (data) {
// console.log(data);
});
(...)
}
And I get the following result:
Promise {< pending >}
__ proto__: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: "done"
How can I get the 'done' value from [[PromiseResult]]? If needed I can provide more code (from server too)