Skip to content

Commit

Permalink
Add some docs to @/http README
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Oct 23, 2019
1 parent c51e043 commit 2f0015a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/http/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# @hyperapp/http

Make HTTP requests from Hyperapp.

## Installation

```console
npm i @hyperapp/http
```

## Usage

```js
import { get } from "@hyperapp/http"

const GotResult = (state, { result }) => ({ ...state, result })

const factor = expression =>
get({
url: `https://newton.now.sh/factor/${expression}`,
expect: "json",
action: GotResult
})
```

## License

[MIT](../../LICENSE.md)

0 comments on commit 2f0015a

Please sign in to comment.