Hello! I see <JS uses a Ktor engine>, would it mak...
# apollo-kotlin
d
Hello! I see JS uses a Ktor engine, would it make sense for Kotlin/Native (e.g. Linux) to use it as well? I am wondering if I could use Apollo for an executable binary, using HttpClient(Curl)
👍 1
alternatively I guess that the jar could do the job, as far as everyone has Java configured, but that might not be the case for iOS devs
m
I think we have an issue for this, let me check
It hasn't been prioritized yet but pull requests are welcome!
d
Good to know! I’ll check it out
I debugged the issue using a convenient tool (Ok2Curl) and found the reason (restricted API). Also created an Apollo-Kotlin issue to consider having a KMP implementation
m
Nice, thanks for the follow up and for filing this!
d
no problem 🙂 if I find time and motivation I can look at it, but I thought best to share just in case something like this was already done, or attempted and failed for some reason
m
I don't think so (that anything was attempted before). Would be cool would be to have it in some IntelliJ plugin like the one @bod is building. Right click -> "copy as curl"
Would also love to have "copy as okhttp" that produces a
*.main.kts
script
d
indeed, Chrome and Flipper have these options, and they are quite convenient to share the requests
I don't recall seeing a copy as okhttp option, but it could be convenient as well
m
Yea, haven't seen it anywhere, sounds a bit challenging to add it to chrome devtools but would be a cool thing 🙂
Both for okhttp and kotlin scripting
d
indeed