I think the requests-as-an-alternative-to-commands pattern would serve you
here. (Sorry no link but there was a more detailed example a while back.)
Basically, you create a type that parallels Cmd in that it supports batch and
map functionality and you have it embody the notion of making HTTP requests.
When the requests get to your service layer, they get turned into actual HTTP
Cmds with the appropriate auth token attached. (Your request type should also
allow wrapping normal Cmds so that you can pass those through as well.)
This pattern essentially handles "middleware" as an outer wrapper on the model
standing between your "real" model and the outside world.
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.