haskell-servant / servant-elm

Automatically derive Elm functions to query servant webservices
BSD 3-Clause "New" or "Revised" License
164 stars 48 forks source link

Clarify that servant-elm does support elm/http 2.0.0 #52

Closed jonathanjouty closed 7 months ago

jonathanjouty commented 5 years ago

https://package.elm-lang.org/packages/elm/http/latest/Http

There is no obvious CHANGELOG, but it's described (in very little detail) here: https://elm-lang.org/blog/working-with-files

The basic changes we had to do on our project was change Http.Request resp to Cmd msg. This removes Http.send and instead you pass your msg constructor into the expect helper. There's also a small change to the record passed to request.

There might as well be more things that I've overlooked :)

k-bx commented 5 years ago

@jonathanjouty latest servant-elm was migrated to http 2.0.0 actually. did you try 0.6.0.1?

jonathanjouty commented 5 years ago

Oh, sorry I just spotted k-bx/servant-elm/pull/3...

I was basing my assumption solely on the documentation I saw on the main Hackage page, i.e. the README.md.

k-bx commented 5 years ago

ooh, right, I thought that was changed to be up to date. @jonathanjouty would you care to make a PR updating it?

jonathanjouty commented 5 years ago

@k-bx I can try when I have a bit of time :) No promises!