PerformanceIMMO/elm-utils/2.1.0

NOTE: the latest version is 5.5.0

Renamed to SquirclesIO/elm-utils. It is published under that name, and new versions come out there.

Versions published as PerformanceIMMO/elm-utils still install under that name. 24 versions of 25 come from the new location (see their notes). 1 version could not be recovered and cannot be installed.

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/SquirclesIO/elm-utils.

What we checked: The repo moved to github.com/SquirclesIO/elm-utils. Rebuilt with git archive from commit d35a4f11250c of https://github.com/SquirclesIO/elm-utils (zip prefix PerformanceIMMO-elm-utils-d35a4f1/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 920655ce0f60d6f5292b53a2e4acac0ef0c6bf38.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/PerformanceIMMO/elm-utils/zipball/2.1.0/

Perfimmo.Http.HttpRequest

HttpRequest

Types

type Request a
= Get String (Expect a)
| Delete String (Expect a)
| Post String Body (Expect a)
| Put String Body (Expect a)
| Patch String Body (Expect a)

Request

= BodyResponse Metadata a

BodyResponse

type HttpError e
= TechnicalError String
| DomainError (BodyResponse e)

HttpError

type alias HttpResult e a =
Result (HttpError e) (BodyResponse a)

HttpResult

type alias ResponseDecoder e a =
{ koDecoder : Decoder e
, okDecoder : Decoder a
}

ResponseDecoder

Functions

withAuthReq : Request a -> Cmd a

withAuthReq

request : RestNavigationLink -> Body -> Expect a -> Request a

request

authRequest : RestNavigationLink -> Body -> Expect a -> Cmd a

authRequest

withAuthReqWithHeaders : List Header -> Request a -> Cmd a

withAuthReqWithHeaders

Helper

printHttpError : Error -> String

printHttpError

Expect

expectJsonResponse : (Result Error ( Metadata, a ) -> msg) -> Decoder a -> Expect msg

expectJsonResponse

expectWhateverResponse : (Result Error Metadata -> msg) -> Expect msg

expectWhateverResponse

expectJsonResponse2 : (HttpResult e a -> msg) -> ResponseDecoder e a -> Expect msg

expectJsonResponse2

expectWhateverOkResult : (HttpResult e () -> msg) -> Decoder e -> Expect msg

expectWhateverOkResult

Transformations

bool2Uri : Bool -> String

bool2Uri