Make HTTP Requests in Elm

Following the example of James Vaughan (post , commit ) we replace the RandomCat page url with https://wiki.ralfbarkow.ch/2023-05-27.json :

- { url = "https://aws.random.cat/meow" + { url = "https://wiki.ralfbarkow.ch/2023-05-27.json"

and get the message:

GotResult Err … 0 = BadBody "Problem... `file`"

We refactor: commit

- , expect = Http.expectJson GotResult (field "file" string) + , expect = Http.expectJson GotResult (field "title" string)

Note: We opened https://wiki.ralfbarkow.ch/2023-05-27.json and found that the name of the first field is title.

~

VAUGHAN, James, 2018. How To Make HTTP Requests In Elm. post Elm is a language designed for building reliable and robust frontend applications. Its purely functional nature makes it a great language for frontend developers who want to get some exposure to functional programming. I think Elm is great, but some of the concepts and patterns commonly used in Elm applications really confused me when I was first learning about it. I’m hoping that these posts will help others who are in that situation.