kkazuo / expect-bytes

Expect Bytes with Http

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expect Bytes with Http

This package provides the function expectBytes that you will expect for Http.

You will not wasting time searching how to do just receive Bytes from Http.get any more.

Example

    import Bytes exposing (Bytes)
    import Http
    import Http.Just

    type Msg
        = GotBytes (Result Http.Error Bytes)

    getBytes : Cmd Msg
    getBytes =
        Http.get
            { url = "/bytes"
            , expect = Http.Just.expectBytes GotBytes
            }

About

Expect Bytes with Http

License:MIT License


Languages

Language:Elm 100.0%