Sequence Http.get in Elm
问题 Below I have a button that attempts to load remote content ... import Post exposing (Post) import Html exposing (..) import Html.Events exposing (..) import Http import Json.Decode as Decode type alias Model = { posts : List Post } type Msg = Search String | PostsReceived (Result Http.Error (List Post)) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of Search s -> let cmd = (Decode.list Post.decode) |> Http.get ("/posts?author=" ++ s) |> Http.send PostsReceived in (