elm-spa-example icon indicating copy to clipboard operation
elm-spa-example copied to clipboard

elm/http 2.0

Open chevinbrown opened this issue 6 years ago • 5 comments

I'm working with this architecture example & an existing project that is using elm/http 2.0...is there a straightforward path to upgrading that API?

I've been attempting, but continually getting stuck...will happily do the gruntwork if I can get an assist to get started. 😃

chevinbrown avatar Apr 16 '19 22:04 chevinbrown

It's easy, your functions simply return Cmd Msg, instead of a Request object.

berenddeboer avatar Apr 21 '19 22:04 berenddeboer

@berenddeboer, yes you're right...but that signature change carries across all callsites and I'm unsure of the best path forward to map Cmd Msg, which is what I'm really curious about. Maybe you can provide more insight for this particular change as it relates to this project?

chevinbrown avatar Apr 23 '19 13:04 chevinbrown

@berenddeboer 'it's easy' - 3mo ago... anyone feel like posting a Gist / Ellie or a pull-request of what this update to http 2.0 might look like in practice?

jsmith-dev avatar Aug 05 '19 05:08 jsmith-dev

Well if you are not looking to completly migrate existing calls but rather use Http 2.0 in the project for your own different api calls while experimenting with the particular project there is allso the https://package.elm-lang.org/packages/NoRedInk/http-upgrade-shim/1.0.0/Http-Legacy which can make transition phase a peace of cake essentially allows you to have both versions on the project at the same time.

nikolisgal avatar Oct 08 '19 11:10 nikolisgal

@chevinbrown @jsmith-dev I have a completely new implementation that uses the latest elm/http among other things.

dwayne avatar Apr 23 '24 01:04 dwayne