Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iarthstar/purescript-fetch-api

Fetch API JS bindings for PureScript
https://github.com/iarthstar/purescript-fetch-api

api bindings fetch fetch-api javascript purescript rest

Last synced: about 1 month ago
JSON representation

Fetch API JS bindings for PureScript

Awesome Lists containing this project

README

        

# purescript-fetch-api

fetch API js bindings for PureScript

## Add purescript-fetch-api to your existing projects

```
bower i purescript-fetch-api
```

## Code Snippet

```purescript
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](https://yarnpkg.com/en/docs/install)

* Build Project

```bash
$ yarn build
```

* To Test

```bash
$ yarn test
```

* To watch for changes

```bash
$ yarn start
```