fetch/text
Read an HTTP response body as plain text
const app = mvfm(prelude, console_, fetch_);
const prog = app({}, ($) => {
const response = $.fetch("https://httpbin.org/robots.txt");
const text = $.fetch.text(response);
return $.console.log(text);
});
await fold(defaults(app), prog); Ctrl+Enter