MVFM

fetch/headers

Get the response headers as a key-value record

const app = mvfm(prelude, console_, fetch_);
const prog = app({}, ($) => {
  const response = $.fetch("https://httpbin.org/response-headers?X-Custom=hello");
  const hdrs = $.fetch.headers(response);
  return $.console.log(hdrs);
});
await fold(defaults(app), prog);
Ctrl+Enter