In the previous post, we created our first Elm HTTP Request. Today we are sending this HTTP request using Elm architecture. This post is part of the functional language series, and it is based on a remarkable book, Programming Elm Build Safe and Maintainable Front-End Applications by Jeremy Fairbank.
Send A Command
In the previous post, we learned how to create HTTP Request as an Elm command. Using this paradigm, Elm makes developer work much easier because it has only to think about application business logic. Elm Architecture handles all communication flows. Today we are sending HTTP.get as Elm Command. In the end, we will test our application in the Chrome Developer Tools Network Tab.
Follow comments in this gist:
Build the application
elm make Picshare.elm,open index.html in Chrome, open Chrome Developer Tools, hit refresh, and observe the network tab.
- Elm separates command creation and execution to help the developer to concentrate on business logic.