Does anyone know of a common interface over an Htt...
# server
r
Does anyone know of a common interface over an Http4K
HttpHandler
& the browser fetch API that would allow using the same code to make HTTP requests in the browser and the server?
c
ktor has a http client that works on the jvm and in js
r
Thanks - I was wondering if the same could be done for http4k or if the async model would be too much of an impedance.
c
i guess the hardest part would be to convince the http4k maintainers to make http4k-core into a multiplatform project
r
I was thinking more of a separate multiplatform interface, and implementing it on the serverside with Http4K and on the client side with the fetch API
But probably copying most (all?) of the Http4K interfaces to do it
c
or you could make it just inspired by http4k, but with
suspend
p
wish they would reevaluate their stance on suspending functions in the main interface now that their concern is no longer valid with 1.6
👍 1
r
What was their concern, and why is it no longer valid? Never mind, found https://github.com/http4k/http4k/issues/94#issuecomment-961746958
👍 1