Thanks I don't quite understand how to chain using Task
I want to first do getCurrentUser Http request and then do notifyOnLocationChange a regular task - but I can't understand how Task could do this. Even chaining 2 http requests I don't understand since in order to fire a Task you have use Task.perform or Task.attempt giving them the Msg - this doesn't seem doable with Task getCurrentUser : Cmd Msg getCurrentUser = Http.toTask (Http.get "/currentUser" decodeLogin) |> Task.attempt CurrentUserResponse notifyOnLocationChange: Cmd Msg notifyOnLocationChange location = Task.perform OnLocationChange (succeed location) any help appreciated On Sunday, 5 February 2017 20:34:56 UTC, John Kelly wrote: > > Take a look at toTask: > http://package.elm-lang.org/packages/elm-lang/http/1.0.0/Http#toTask -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
