HTTP client generator / KSP plugin for Kotlin Multiplatform (Android, iOS, Js, Jvm, Native) using KSP and Ktor clients inspired by Retrofit https://foso.github.io/Ktorfit
APACHE-2.0 License
Bot releases are hidden (Show)
Published by Foso over 1 year ago
This project is now following semver
NEW:
🐛 Bugs fixed
⬆️ Deps updates
Published by Foso over 1 year ago
NEW:
Ktorfit.Builder().baseUrl(testBaseUrl, checkUrl = false).build()
🐛 Bugs fixed
⬆️ Deps updates
Published by Foso over 1 year ago
Add this plugin:
plugins {
id "de.jensklingenberg.ktorfit" version "1.0.0"
}
⬆️ Deps updates
Published by Foso almost 2 years ago
NEW:
Field parameters can now be nullable, null values will be ignored in requests
Add option to turn of error checking
ksp {
arg("Ktorfit_Errors", "1")
}
You can set it in your build.gradle.kts file,
0: Turn off all Ktorfit related error checking
1: Check for errors
2: Turn errors into warnings
Added RequestConverter support #84
⬆️ Deps updates
🐛 Bugs fixed
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta15...v1.0.0-beta16
Published by Foso about 2 years ago
⬆️ Deps updates
🐛 Bugs fixed
💥 Breaking changes
Published by Foso about 2 years ago
NEW:
Query parameters can now be nullable, null values will be ignored in requests
Function return types can now be nullable
FIX:
Url annotation not resolved correctly #65
BREAKING CHANGES:
Changed naming of Converters:
SuspendResponseConverter:
is now called RequestConverter
the wrapSuspendResponse is now called convertRequest.
returnTypeName is replaced through typeData, you can use typeData.qualifiedName to get the same value as returnTypeName RequestConverter need to be added with the requestConverter() on your Ktorfit object.
https://foso.github.io/Ktorfit/requestconverter/
ResponseConverters:
returnTypeName is replaced through typeData, you can use typeData.qualifiedName to get the same value as returnTypeName
https://foso.github.io/Ktorfit/responseconverter/
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta13...v1.0.0-beta14
Published by Foso about 2 years ago
Fixed:
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta12...v1.0.0-beta13
Published by Foso about 2 years ago
wrapResponse from SuspendResponseConverter got renamed to wrapSuspendResponse. This add the possibility to have ResponseConverter and SuspendResponseConverter implemented in the same class.
val kttorfit = ktorfit {
baseUrl("http://example.com/")
}.create<GithubService>()
or this
val kttorfit = ktorfit {
baseUrl("http://example.com/")
}.createGithubService()
By default, IntelliJ/Android Studio can't find the generated code, you need to add the KSP generated folder to the sourcesets
like this: (See more here: https://kotlinlang.org/docs/ksp-quickstart.html#make-ide-aware-of-generated-code)
kotlin.srcDir("build/generated/ksp/jvm/jvmMain/")
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta11...v1.0.0-beta12
Published by Foso about 2 years ago
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta10...v1.0.0-beta11
Published by Foso about 2 years ago
@Headers now requires a vararg of String instead of an Array
e.g. you need to change from:
@Headers( ["Authorization: token ghp_abcdefgh", "Content-Type: application/json"] )
to this:
@Headers( "Authorization: token ghp_abcdefgh", "Content-Type: application/json" )
Thanks to @DATL4G, @hadiyarajesh, @DanielNovak for reporting bugs
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta08...v1.0.0-beta10
Published by Foso over 2 years ago
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta08...v1.0.0-beta09
Published by Foso over 2 years ago
fixed issue with Koin Annotations
Full Changelog: https://github.com/Foso/Ktorfit/compare/v1.0.0-beta07...v1.0.0-beta08
Published by Foso over 2 years ago
========================================
Published by Foso over 2 years ago
Published by Foso over 2 years ago
Published by Foso over 2 years ago
First beta version