Open cah-andrew-fitzgerald opened 7 years ago
This is really awesome idea. It is also aligned to this library's vision. However, as discussed, I am no where near expert in JS backend and not sure how to make this happen. You are very happy to help contribute in here. 👍
I've started working on making Fuel a multi-platform project. It may take long time since I'm having vacation next week, but I plan on finishing it next month.
About making it work in Javascript... It will be easier when fuel will be multi-platform project.
@yoavst Awesome man! I am looking forward to seeing that pans out. :)
The branch will be https://github.com/kittinunf/Fuel/tree/multiplatform_feature
Blocking issue: https://youtrack.jetbrains.com/issue/KT-17005#tab=Changes
Report: Currently kotlin multi platform feature is too buggy to convert an existing library.
In addition, Fuel
is too connected with Java. Instead of working on the multi platform feature, I'll work a bit on hiding implementation details under interfaces. It will probably require a massive refactoring to the library.
The general idea would be to Kotlinify the interfaces used by the project, by hiding everything java by moving it to "internal" (yet public) classes. For normal users with minimal configuration change there should be no migration. For advance users, we can maybe provide extension methods and fields to ease the migration.
What do you think about it, @kittinunf ?
OK 👍
hello! any progress on this? can this lib used for multiplatform project? js / jvm
From Kotlin/Native 0.6 it supports common code with expect
and actual
keywords. Can the scope of this issue be jvm / jvm-android / js / native-ios / native-macos / native-windows / native-linux, etc? I saw code of other multi platform http kotlin lib egorzhdan/networkinkt and saw that possibly project structure can be similar to that.
It is getting impossible to do this without removing a lot of code. It also Forced Coroutines to be a part of the core. That may be a huge turn off to some people.
@iNoles What's about trying to use the official http client as backend, wrapping it with fuel?
Major Code Rewrite. Ktor is very heavily on Coroutines too.
Do we really need a major code rewrite? It seems we can write a Client
that uses the ktor client,
ktor client doesn't have parameters and other related Fuel features.
@yoavst Fuel 3.x SNAPSHOTS supports Javascript
@iNoles do you compare it to ktor in terms of size?
With the release of Kotlin 1.1, the Javascript backend is no longer experimental. It would be nice if the same HTTP API was available at all layers of the kotlin stack.