MVFM

fetch/status

Get the HTTP status code from a response

const app = mvfm(prelude, console_, fetch_);
const prog = app({}, ($) => {
  const response = $.fetch("https://httpbin.org/status/200");
  const code = $.fetch.status(response);
  return $.console.log(code);
});
await fold(defaults(app), prog);
Ctrl+Enter