Package

purescript-fetch-api

Repository
iarthstar/purescript-fetch-api
License
MIT
Uploaded by
iarthstar
Published on
2019-11-08T11:35:14Z

fetch API js bindings for PureScript

Add purescript-fetch-api to your existing projects

bower i purescript-fetch-api

Code Snippet

main :: Effect Unit
main = launchAff_ do
  let configPost = CreateUserReq { name : "Arth K. Gajjar", job : "Developer" }
  fetch configPost >>= case _ of
    Right (CreateUserRes a) -> log $ "POST : " <> show a
    Left err -> logShow err

Development Guide

NOTE : Please make sure you have yarn :: Installing yarn

  • Build Project
$ yarn build
  • To Test
$ yarn test
  • To watch for changes
$ yarn start