Skip to content

Commit

Permalink
version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Sep 2, 2020
1 parent ff665b0 commit 7c7780f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/modules/Http.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Added in v0.5.0

<h2 class="text-delta">Table of contents</h2>

- [creators](#creators)
- [constructors](#constructors)
- [get](#get)
- [post](#post)
- [destructors](#destructors)
Expand All @@ -33,7 +33,7 @@ Added in v0.5.0

---

# creators
# constructors

## get

Expand Down Expand Up @@ -144,9 +144,9 @@ Added in v0.5.0

## send

Executes as `Cmd` the provided call to remote resource, mapping result to a `Msg`.
Executes as `Cmd` the provided call to remote resource, mapping the result to a `Msg`.

It is derived from `sendBy`.
Derived from [`sendBy`](#sendBy).

**Signature**

Expand Down
12 changes: 6 additions & 6 deletions src/Http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export function toTask<A>(req: Request<A>): TaskEither<HttpError, A> {
}

/**
* Executes as `Cmd` the provided call to remote resource, mapping result to a `Msg`.
* Executes as `Cmd` the provided call to remote resource, mapping the result to a `Msg`.
*
* Derived from [`sendBy`](#sendBy).
*
* It is derived from `sendBy`.
* @category utils
* @since 0.5.0
*/
export function send<A, Msg>(f: (e: Either<HttpError, A>) => Msg): (req: Request<A>) => Cmd<Msg> {
Expand All @@ -104,15 +104,15 @@ export function send<A, Msg>(f: (e: Either<HttpError, A>) => Msg): (req: Request

/**
* Executes as `Cmd` the provided call to remote resource, mapping the full Response to a `Msg`.
* @category utils
*
* @since 0.6.0
*/
export function sendBy<A, Msg>(f: (e: Either<HttpError, Response<A>>) => Msg): (req: Request<A>) => Cmd<Msg> {
return flow(xhr, toMsg(f))
}

/**
* @category creators
* @category constructors
* @since 0.5.0
*/
export function get<A>(url: string, decoder: Decoder<A>): Request<A> {
Expand All @@ -128,7 +128,7 @@ export function get<A>(url: string, decoder: Decoder<A>): Request<A> {
}

/**
* @category creators
* @category constructors
* @since 0.5.0
*/
export function post<A>(url: string, body: unknown, decoder: Decoder<A>): Request<A> {
Expand Down

0 comments on commit 7c7780f

Please sign in to comment.