Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@glennsl/rescript-fetch

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

@glennsl/rescript-fetch

Zero-cost rescript bindings to the WHATWG Fetch API

    0.2.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
375
decreased by-28.3%

Weekly downloads

Readme

Source

rescript-fetch

Zero-cost rescript bindings to the WHATWG Fetch API

npm Issues Last Commit

Example

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.

Installation

npm install --save @glennsl/rescript-fetch

Then add @glennsl/rescript-fetch to bs-dependencies in your bsconfig.json:

{ "bs-dependencies": [ + "@glennsl/rescript-fetch" ] }

Documentation

API

For the moment, please see the interface file:

  • Fetch

Changes

0.2.0

  • [BREAKING] Updated required minimum version of rescript to 10.1.2 in order to use the new promise type alias and async/await.
  • Removed @ryyppy/rescript-promise dependency.

0.1.0

Initial release

Keywords

FAQs

Last updated on 18 Feb 2023

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc