The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

morr0350 (3) [Avatar] Offline
#1
If you have the latest Elm 0.19 and elm/http 2.0.0, the HTTP request code needs to be updated in InitialCommand on page 106 to:

initialCommand: Cmd Msg
initialCommand =
    { url = "http://elm-in-action.com/photos/list", expect = Http.expectString GotPhotos }
    |> Http.get


And then, later in the chapter, page 116, when the list decoder is added to expect a List of decoded Photos from JSON, the updated code would be:

initialCommand: Cmd Msg
initialCommand =
    Http.get 
        { url = "http://elm-in-action.com/photos/list.json"
        , expect = Http.expectJson GotPhotos (list photoDecoder)
        }