Low-level OCaml/ReasonML bindings to the Fetch API for BuckleScript (Belt/bs-platform). Current stable version is 0.6.2, last released in 2019. The package provides thin, type-safe bindings to fetch, Response, Headers, Request, AbortController, and FormData. It targets BuckleScript 5+ and is intended as a foundation for higher-level libraries. Unlike many other fetch bindings, it follows the ML naming conventions (e.g., `Response.type_` instead of `Response._type`) and requires a polyfill in Node.js. The package is no longer actively maintained; users should consider migrating to newer solutions like `promise-fetch` or direct `Js.Promise` + `fetch`.
npm install bs-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use bs-fetch to perform a GET request and parse JSON response, including error handling and Node polyfill setup.
Replace all uses of `Response._type` with `Response.type_`.
Change `Bs_fetch.xxx` to `Fetch.xxx`.
Ensure code that used the return values of these functions is updated.
Install isomorphic-fetch and add `[%raw "require('isomorphic-fetch')"]` at the top of your entry file.Use Headers.make([("key", "value")]) or Headers.makeWithDict(Js.Dict.fromList(...)) accordingly.Consider migrating to newer libraries like promise-fetch or directly using Js.Promise with the global fetch binding.
Replace `Bs_fetch` with `Fetch` in your code.
Install isomorphic-fetch: `npm install isomorphic-fetch` and add `[%raw "require('isomorphic-fetch')"]` at the top of your main file.Use `Response.type_` instead of `Response._type`.
Upgrade to bs-fetch >=0.3.0 or use Headers.make with array pairs.