Socket
Socket
Sign inDemoInstall

@glennsl/rescript-fetch

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @glennsl/rescript-fetch

Zero-cost rescript bindings to the WHATWG Fetch API


Version published
Weekly downloads
1.6K
increased by9.64%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

rescript-fetch

  • Experimental zero-cost rescript bindings to the WHATWG Fetch API

npm Issues Last Commit

Example

let postBanana = data => {
  open Fetch

  fetch(
    "/api/bananas",
    {
      method: #POST,
      body: data->Js.Json.stringifyAny->Belt.Option.getExn->Body.Init.string,
      headers: Headers.Init.object({
        "Content-type": "application/json",
      }),
    },
  )->Promise.then(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.1.0

Initial release

Keywords

FAQs

Last updated on 13 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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