@glennsl/rescript-fetch
Advanced tools
Weekly downloads
Readme
Zero-cost rescript bindings to the WHATWG Fetch API
let postBanana = async data => {
open Fetch
let response = await fetch(
"/api/bananas",
{
method: #POST,
body: data->Js.Json.stringifyAny->Belt.Option.getExn->Body.string,
headers: Headers.fromObject({
"Content-type": "application/json",
}),
},
)
await response->Response.json
}
See examples for more.
npm install --save @glennsl/rescript-fetch
Then add @glennsl/rescript-fetch
to bs-dependencies
in your bsconfig.json
:
{
"bs-dependencies": [
+ "@glennsl/rescript-fetch"
]
}
For the moment, please see the interface file:
@ryyppy/rescript-promise
dependency.Initial release
FAQs
Zero-cost rescript bindings to the WHATWG Fetch API
The npm package @glennsl/rescript-fetch receives a total of 271 weekly downloads. As such, @glennsl/rescript-fetch popularity was classified as not popular.
We found that @glennsl/rescript-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.