square / retrofit

A type-safe HTTP client for Android and the JVM
https://square.github.io/retrofit/
Apache License 2.0
43.14k stars 7.3k forks source link

Retrofit Kotlin examples #4205

Closed Amir-yazdanmanesh closed 3 months ago

Amir-yazdanmanesh commented 3 months ago

Why doesn't Retrofit have any Kotlin examples? Can I write some sample examples and submit a PR?

shubhamdevgupta commented 3 months ago

yes you can , just create request and response class for the api and create a pr

JakeWharton commented 3 months ago

There are no Kotlin examples for the same reason there are no Scala or Clojure examples: Retrofit is fundamentally a Java library. Aside from suspend fun support, all of the features are the same in Java as they are in Kotlin, and users can trivially convert the Java examples into whichever JVM language they want. The only example I'd accept a PR for in Kotlin would be for showing off suspend fun.