diff --git a/404.html b/404.html index 0f151d823..843746b73 100644 --- a/404.html +++ b/404.html @@ -18,4 +18,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---> Ktorfit
\ No newline at end of file +--> Ktorfit
\ No newline at end of file diff --git a/CHANGELOG/index.html b/CHANGELOG/index.html index b20957700..60935aa1f 100644 --- a/CHANGELOG/index.html +++ b/CHANGELOG/index.html @@ -1,4 +1,4 @@ - Changelog - Ktorfit
Skip to content
🤔 Documentation issue? Report or edit

Changelog

All important changes of this project must be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security

1.6.0 - 2023-08-24

Added

Changed

  • KSP version 1.9.10-1.0.13 is now required
  • Upgrade dependencies: Ktor 2.3.3

Deprecated

Removed

Fixed

Security

1.5.0 - 2023-08-04

Added

Changed

  • KSP version 1.9.0-1.0.13 is now needed

Deprecated

Removed

Fixed

Security

1.4.4 - 2023-07-26

Added

Changed

  • Upgrade dependencies: Ktor 2.3.2

Deprecated

Removed

Fixed

Security

1.4.3 - 2023-07-13

Added

Changed

Deprecated

Removed

Fixed

372 Crash with Xiaomi on create Ktorfit.Builder by @princeparadoxes

Security

1.4.2 - 2023-06-25

Added

Changed

Deprecated

Removed

Fixed

323 Code generation issue for @Multipart / @FormUrlEncoded by @Ph1ll1pp

Security

1.4.1 - 2023-06-03

Added

Changed

  • Upgrade dependencies: Ktor 2.3.1

Deprecated

Removed

Fixed

236 Parsing error for list/array

Security

1.4.0 - 2023-05-27

Added

  • 85 Added a Response class that can be used as a wrapper around the API Response, the converter for it is automatically applied. thx to @vovahost, @DATL4G

e.g.

interface ExampleApi{
+ Changelog - Ktorfit       
🤔 Documentation issue? Report or edit

Changelog

All important changes of this project must be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security

1.6.0 - 2023-08-24

Added

Changed

  • KSP version 1.9.10-1.0.13 is now required
  • Upgrade dependencies: Ktor 2.3.3

Deprecated

Removed

Fixed

Security

1.5.0 - 2023-08-04

Added

Changed

  • KSP version 1.9.0-1.0.13 is now needed

Deprecated

Removed

Fixed

Security

1.4.4 - 2023-07-26

Added

Changed

  • Upgrade dependencies: Ktor 2.3.2

Deprecated

Removed

Fixed

Security

1.4.3 - 2023-07-13

Added

Changed

Deprecated

Removed

Fixed

372 Crash with Xiaomi on create Ktorfit.Builder by @princeparadoxes

Security

1.4.2 - 2023-06-25

Added

Changed

Deprecated

Removed

Fixed

323 Code generation issue for @Multipart / @FormUrlEncoded by @Ph1ll1pp

Security

1.4.1 - 2023-06-03

Added

Changed

  • Upgrade dependencies: Ktor 2.3.1

Deprecated

Removed

Fixed

236 Parsing error for list/array

Security

1.4.0 - 2023-05-27

Added

  • 85 Added a Response class that can be used as a wrapper around the API Response, the converter for it is automatically applied. thx to @vovahost, @DATL4G

e.g.

interface ExampleApi{
   suspend fun getUser(): Response<User>
 }
 
diff --git a/License/index.html b/License/index.html
index 4becaa65f..651c69d7f 100644
--- a/License/index.html
+++ b/License/index.html
@@ -1,4 +1,4 @@
- License - Ktorfit      
🤔 Documentation issue? Report or edit

License

                             Apache License
+ License - Ktorfit      
🤔 Documentation issue? Report or edit

License

                             Apache License
                        Version 2.0, January 2004
                     http://www.apache.org/licenses/
 

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

  1. Definitions.

    “License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

    “Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

    “Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

    “You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License.

    “Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

    “Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

    “Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

    “Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

    “Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.”

    “Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

    (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

    (b) You must cause any modified files to carry prominent notices stating that You changed the files; and

    © You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

    (d) If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

    You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

  To apply the Apache License to your work, attach the following
diff --git a/architecture/index.html b/architecture/index.html
index ee28f20ef..c28d260b8 100644
--- a/architecture/index.html
+++ b/architecture/index.html
@@ -1,4 +1,4 @@
- Architecture - Ktorfit       
🤔 Documentation issue? Report or edit

How Ktorfit works under the hood

Ktorfit consists of three main components KSP-Plugin, Compiler plugin and the Ktorfit lib

KSP-Plugin

This will generate the code for the implementation of the interfaces

Compiler plugin

This transforms the create() function from the Ktorfit lib

Ktorfit lib

A wrapper around Ktor to simplify code generation

Example

package com.example
+ Architecture - Ktorfit       
🤔 Documentation issue? Report or edit

How Ktorfit works under the hood

Ktorfit consists of three main components KSP-Plugin, Compiler plugin and the Ktorfit lib

KSP-Plugin

This will generate the code for the implementation of the interfaces

Compiler plugin

This transforms the create() function from the Ktorfit lib

Ktorfit lib

A wrapper around Ktor to simplify code generation

Example

package com.example
 
 import com.example.model.People
 import de.jensklingenberg.ktorfit.http.GET
diff --git a/configuration/index.html b/configuration/index.html
index 50b09a430..541b260b3 100644
--- a/configuration/index.html
+++ b/configuration/index.html
@@ -1,4 +1,4 @@
- Configuration - Ktorfit       
🤔 Documentation issue? Report or edit

Compile errors

By default, Ktorfit will throw compile error when it finds conditions under which it can’t ensure that it will work correct. You can set an KSP argument to change this:

ksp {
+ Configuration - Ktorfit       
🤔 Documentation issue? Report or edit

Compile errors

By default, Ktorfit will throw compile error when it finds conditions under which it can’t ensure that it will work correct. You can set an KSP argument to change this:

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

Add your own Ktor client

You can set your Ktor client instance to the Ktorfit builder:

val myClient = HttpClient()
diff --git a/converters/converters/index.html b/converters/converters/index.html
index 85ed3c70b..d89b68d47 100644
--- a/converters/converters/index.html
+++ b/converters/converters/index.html
@@ -1 +1 @@
- Converters - Ktorfit       
🤔 Documentation issue? Report or edit

Converters

Converters are used to convert the HTTPResponse or parameters.

They are added inside of a Converter.Factory which will then be added to the Ktorfit builder with the converterfactories() function.

Converter Types

Existing converter factories

  • CallConverterFactory
  • FlowConverterFactoy

Last update: May 27, 2023
\ No newline at end of file + Converters - Ktorfit
🤔 Documentation issue? Report or edit

Converters

Converters are used to convert the HTTPResponse or parameters.

They are added inside of a Converter.Factory which will then be added to the Ktorfit builder with the converterfactories() function.

Converter Types

Existing converter factories

  • CallConverterFactory
  • FlowConverterFactoy

Last update: May 27, 2023
\ No newline at end of file diff --git a/converters/example1/index.html b/converters/example1/index.html index 271ee4f6e..22e3fecee 100644 --- a/converters/example1/index.html +++ b/converters/example1/index.html @@ -1,4 +1,4 @@ - Example1 - Ktorfit
🤔 Documentation issue? Report or edit

Example1

Let’s say you want to get an user from an API and the response you get looks like below:

API response
{
+ Example1 - Ktorfit      
🤔 Documentation issue? Report or edit

Example1

Let’s say you want to get an user from an API and the response you get looks like below:

API response
{
     "success": true,
     "user":
     {
diff --git a/converters/migration/index.html b/converters/migration/index.html
index 22785204c..c11efbbc4 100644
--- a/converters/migration/index.html
+++ b/converters/migration/index.html
@@ -1,4 +1,4 @@
- Migration - Ktorfit      
🤔 Documentation issue? Report or edit

Migration

  • SuspendResponseConverter -> Converter.SuspendResponseConverter
SuspendResponseConverter
 override suspend fun <RequestType> wrapSuspendResponse(
+ Migration - Ktorfit      
🤔 Documentation issue? Report or edit

Migration

  • SuspendResponseConverter -> Converter.SuspendResponseConverter
SuspendResponseConverter
 override suspend fun <RequestType> wrapSuspendResponse(
     typeData: TypeData,
     requestFunction: suspend () -> Pair<TypeInfo, HttpResponse>,
     ktorfit: Ktorfit
diff --git a/converters/requestparameterconverter/index.html b/converters/requestparameterconverter/index.html
index ac2ee3675..9d526df61 100644
--- a/converters/requestparameterconverter/index.html
+++ b/converters/requestparameterconverter/index.html
@@ -1,4 +1,4 @@
- RequestParameterConverter - Ktorfit       
🤔 Documentation issue? Report or edit

RequestParameterConverter

@GET("posts/{postId}/comments")
+ RequestParameterConverter - Ktorfit       
🤔 Documentation issue? Report or edit

RequestParameterConverter

@GET("posts/{postId}/comments")
 suspend fun getCommentsById(@RequestType(Int::class) @Path("postId") postId: String): List<Comment>
 

You can set RequestType at a parameter with a type to which the parameter should be converted.

Then you need to implement a Converter factory with a RequestParameterConverter.

class StringToIntRequestConverterFactory : Converter.Factory {
     override fun requestParameterConverter(
diff --git a/converters/responseconverter/index.html b/converters/responseconverter/index.html
index 650cca3c4..281d32fc9 100644
--- a/converters/responseconverter/index.html
+++ b/converters/responseconverter/index.html
@@ -1,4 +1,4 @@
- ResponseConverter - Ktorfit       
🤔 Documentation issue? Report or edit

ResponseConverter

You only need ResponseConverters for cases where you can’t use a suspend function in your interface. For every other case you want SuspendResponseConverter

Because Ktor relies on Coroutines by default your functions need to have the suspend modifier.

Let’s say you have API endpoint to get a list of comments and you want to get them as Flow.

Ktorfit already has a converter for Flow, but it’s used as an example

@GET("/user")
+ ResponseConverter - Ktorfit       
🤔 Documentation issue? Report or edit

ResponseConverter

You only need ResponseConverters for cases where you can’t use a suspend function in your interface. For every other case you want SuspendResponseConverter

Because Ktor relies on Coroutines by default your functions need to have the suspend modifier.

Let’s say you have API endpoint to get a list of comments and you want to get them as Flow.

Ktorfit already has a converter for Flow, but it’s used as an example

@GET("/user")
 fun getUser(): Flow<List<Commment>>
 

Now you need a converter that can convert the HTTPResponse and return a Flow. Create a class that extends Converter.Factory

class FlowConverterFactory : Converter.Factory {
 }
diff --git a/converters/suspendresponseconverter/index.html b/converters/suspendresponseconverter/index.html
index 26b17ffd2..be13c79d4 100644
--- a/converters/suspendresponseconverter/index.html
+++ b/converters/suspendresponseconverter/index.html
@@ -1,4 +1,4 @@
- SuspendResponseConverter - Ktorfit      
🤔 Documentation issue? Report or edit

SuspendResponseConverter

Let`s say you have a function that requests a list of comments

@GET("posts/{postId}/comments")
+ SuspendResponseConverter - Ktorfit      
🤔 Documentation issue? Report or edit

SuspendResponseConverter

Let`s say you have a function that requests a list of comments

@GET("posts/{postId}/comments")
 suspend fun getCommentsByPostId(@Path("postId") postId: Int): List<Comment>
 

But now you want to directly wrap your comment list in your data holder class e.g. “MyOwnResponse”

sealed class MyOwnResponse<T> {
     data class Success<T>(val data: T) : MyOwnResponse<T>()
diff --git a/development/index.html b/development/index.html
index 897f555ee..23ffeec65 100644
--- a/development/index.html
+++ b/development/index.html
@@ -1 +1 @@
- Development - Ktorfit       
\ No newline at end of file + Development - Ktorfit
\ No newline at end of file diff --git a/fundamentals/scope/index.html b/fundamentals/scope/index.html index d5c0fabfc..a0420d347 100644 --- a/fundamentals/scope/index.html +++ b/fundamentals/scope/index.html @@ -1 +1 @@ - Scope - Ktorfit
🤔 Documentation issue? Report or edit

Scope of Ktorfit

The goal of Ktorfit is to provide a similar developer experience like Retrofit for Kotlin Multiplatform projects. It`s not a 100% drop-in replacement for Retrofit. It uses Ktor clients because they are available on nearly every compile target of KMP. Every feature should be implemented so that it works on all platforms that Ktor supports. Before a new functionality is added to Ktorfit, it should be checked if there is already a Ktor plugin for it which solves the same problem.


Last update: March 4, 2023
\ No newline at end of file + Scope - Ktorfit
🤔 Documentation issue? Report or edit

Scope of Ktorfit

The goal of Ktorfit is to provide a similar developer experience like Retrofit for Kotlin Multiplatform projects. It`s not a 100% drop-in replacement for Retrofit. It uses Ktor clients because they are available on nearly every compile target of KMP. Every feature should be implemented so that it works on all platforms that Ktor supports. Before a new functionality is added to Ktorfit, it should be checked if there is already a Ktor plugin for it which solves the same problem.


Last update: March 4, 2023
\ No newline at end of file diff --git a/index.html b/index.html index 823eb7896..666d9e3d1 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ - Ktorfit
🤔 Documentation issue? Report or edit

Ktorfit

All Contribtors jCenter

Introduction

Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux) using KSP and Ktor clients inspired by Retrofit

Installation

Please see Installation

Quick start

Please see Quick start

Requests

See Requests

Converters

See documentation Here

Changelog

See changelog

Acknowledgments

Some parts of this project are reusing ideas that are originally coming from Retrofit from Square. Thank you for Retrofit!

Thanks to JetBrains for Ktor and Kotlin!

Contributions

When you find unexpected behaviour please write an issue


Last update: May 27, 2023
\ No newline at end of file + Ktorfit
🤔 Documentation issue? Report or edit

Ktorfit

All Contribtors jCenter

Introduction

Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux) using KSP and Ktor clients inspired by Retrofit

Installation

Please see Installation

Quick start

Please see Quick start

Requests

See Requests

Converters

See documentation Here

Changelog

See changelog

Acknowledgments

Some parts of this project are reusing ideas that are originally coming from Retrofit from Square. Thank you for Retrofit!

Thanks to JetBrains for Ktor and Kotlin!

Contributions

When you find unexpected behaviour please write an issue


Last update: May 27, 2023
\ No newline at end of file diff --git a/installation/index.html b/installation/index.html index 0260d370e..6324408e9 100644 --- a/installation/index.html +++ b/installation/index.html @@ -1,4 +1,4 @@ - Installation - Ktorfit
🤔 Documentation issue? Report or edit

Installation

Setup

(You can also look how it’s done in the examples)

Gradle Plugins

You need to add KSP and the Ktorfit Gradle plugin

plugins {
+ Installation - Ktorfit       
🤔 Documentation issue? Report or edit

Installation

Setup

(You can also look how it’s done in the examples)

Gradle Plugins

You need to add KSP and the Ktorfit Gradle plugin

plugins {
   id("com.google.devtools.ksp") version "CURRENT_KSP_VERSION"
   id("de.jensklingenberg.ktorfit") version "1.0.0"
 }
diff --git a/quick-start/index.html b/quick-start/index.html
index 2e8329363..d18824d69 100644
--- a/quick-start/index.html
+++ b/quick-start/index.html
@@ -1,4 +1,4 @@
- Quick start - Ktorfit      
🤔 Documentation issue? Report or edit

Quick start

First do the Installation

Let’s say you want to make a GET Request to https://swapi.dev/api/people/1/

Create a new Kotlin interface:

interface ExampleApi {
+ Quick start - Ktorfit      
🤔 Documentation issue? Report or edit

Quick start

First do the Installation

Let’s say you want to make a GET Request to https://swapi.dev/api/people/1/

Create a new Kotlin interface:

interface ExampleApi {
     @GET("people/1/")
     suspend fun getPerson(): String
 }
diff --git a/requests/index.html b/requests/index.html
index d3154d1da..b78b25f30 100644
--- a/requests/index.html
+++ b/requests/index.html
@@ -1,4 +1,4 @@
- Requests - Ktorfit       
🤔 Documentation issue? Report or edit

Requests

HTTP Request

Ktorfit supports the following the HTTP method annotations:

  • @GET
  • @POST
  • @PUT
  • @DELETE
  • @HEAD
  • @OPTIONS
  • @PATCH

Or you can set your custom method to @HTTP

@GET("posts")
+ Requests - Ktorfit       
🤔 Documentation issue? Report or edit

Requests

HTTP Request

Ktorfit supports the following the HTTP method annotations:

  • @GET
  • @POST
  • @PUT
  • @DELETE
  • @HEAD
  • @OPTIONS
  • @PATCH

Or you can set your custom method to @HTTP

@GET("posts")
 fun getPosts(): List<Post>
 

The value of the HTTP annotation will be appended to the baseUrl that you set in the Ktorfit builder. If the value contains a url that starts with http or https, this url will be used for the request instead of the baseUrl.

@GET("https://example.com/posts")
 fun getPosts(): List<Post>
diff --git a/responseconverter/index.html b/responseconverter/index.html
index 4f398f350..e06f75569 100644
--- a/responseconverter/index.html
+++ b/responseconverter/index.html
@@ -1,4 +1,4 @@
- Responseconverter - Ktorfit      
🤔 Documentation issue? Report or edit

Responseconverter

ResponseConverter is deprecated, use Converter.ResponseConverter instead

Let`s say you have a function that requests a list of comments

@GET("posts/{postId}/comments")
+ Responseconverter - Ktorfit      
🤔 Documentation issue? Report or edit

Responseconverter

ResponseConverter is deprecated, use Converter.ResponseConverter instead

Let`s say you have a function that requests a list of comments

@GET("posts/{postId}/comments")
 suspend fun getCommentsByPostId(@Path("postId") postId: Int): List<Comment>
 

But now you want to directly wrap your comment list in your data holder class e.g. “MyOwnResponse”

sealed class MyOwnResponse<T> {
     data class Success<T>(val data: T) : MyOwnResponse<T>()
diff --git a/sitemap.xml b/sitemap.xml
index 1c65bcabc..50c953410 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2,92 +2,92 @@
 
     
          https://github.com/Foso/Ktorfit/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/CHANGELOG/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/License/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/architecture/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/configuration/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/development/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/installation/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/quick-start/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/requests/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/responseconverter/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/suspendresponseconverter/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/converters/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/example1/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/migration/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/requestparameterconverter/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/responseconverter/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/converters/suspendresponseconverter/
-         2023-08-29
+         2023-08-31
          daily
     
     
          https://github.com/Foso/Ktorfit/fundamentals/scope/
-         2023-08-29
+         2023-08-31
          daily
     
 
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index 8beae4f5b..1dd986bde 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ
diff --git a/suspendresponseconverter/index.html b/suspendresponseconverter/index.html
index 96fd40e46..4612336c0 100644
--- a/suspendresponseconverter/index.html
+++ b/suspendresponseconverter/index.html
@@ -1,4 +1,4 @@
- Suspendresponseconverter - Ktorfit       
🤔 Documentation issue? Report or edit

Suspendresponseconverter

SuspendResponseConverter is deprecated, use Converter.SuspendResponseConverter instead

Because Ktor relies on Coroutines by default your functions need to have the suspend modifier.

To change this, you need to use a SuspendResponseConverter, you add your own or use Flow or Call

You can add RequestConverter on your Ktorfit object.

ktorfit.responseConverter(FlowResponseConverter())
+ Suspendresponseconverter - Ktorfit       
🤔 Documentation issue? Report or edit

Suspendresponseconverter

SuspendResponseConverter is deprecated, use Converter.SuspendResponseConverter instead

Because Ktor relies on Coroutines by default your functions need to have the suspend modifier.

To change this, you need to use a SuspendResponseConverter, you add your own or use Flow or Call

You can add RequestConverter on your Ktorfit object.

ktorfit.responseConverter(FlowResponseConverter())
 

Flow

Ktorfit has support for Kotlin Flow. You need add the FlowResponseConverter() to your Ktorfit instance.

ktorfit.responseConverter(FlowResponseConverter())
 
@GET("comments")
 fun getCommentsById(@Query("postId") postId: String): Flow<List<Comment>>