0.7.0 • Published 4 years ago

@highpoint/bs-js-fetch v0.7.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

bs-js-fetch

BuckleScript bindings for HighPoint's js-fetch.

Pre-requisites

Installation

yarn add @highpoint/bs-js-fetch 

In your bsconfig.json, include "@highpoint/bs-js-fetch" in the bs-dependencies.

Usage

open Fetch;

json(~url="http://google.com", ())
|> Js.Promise.then_(result => /* do something with `result` */ );

let abortController = AbortController.make();

postForm(
  ~url="schedule-builder",
  ~options=Options.(make(~body=Body.make("key1=value1&key2=value2", ~signal=(abortController |> AbortController.signal), ()))),
  ()
)
|> Js.Promise.then_(result => /* do something with `result` */ )

postJSON(
  ~url="message-center",
  ~options=Options.(make(~body=Body.makeWithUrlSearchParams(urlSearchParams), ())),
  ()
)
|> Js.Promise.then_(result => /* do something with `result` */ )
0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago