File tree Expand file tree Collapse file tree 2 files changed +6
-28
lines changed
ktorfit-ksp/src/main/kotlin/de/jensklingenberg/ktorfit/model
sandbox/src/commonMain/kotlin/com/example/api Expand file tree Collapse file tree 2 files changed +6
-28
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,12 @@ fun KSFunctionDeclaration.toFunctionData(
207
207
addImport(" io.ktor.util.AttributeKey" )
208
208
}
209
209
210
- if (it is Body || it is ParameterAnnotation .PartMap || it is ParameterAnnotation .Part ) {
210
+ if (it is Body ||
211
+ it is ParameterAnnotation .PartMap ||
212
+ it is ParameterAnnotation .Part ||
213
+ it is FieldMap ||
214
+ it is Field
215
+ ) {
211
216
addImport(" io.ktor.client.request.setBody" )
212
217
}
213
218
Original file line number Diff line number Diff line change @@ -18,22 +18,6 @@ interface KtorSamplesApi {
18
18
19
19
val test1: String
20
20
21
- @POST(" signup" )
22
- suspend fun sendReg (
23
- @Body param : Parameters
24
- ): String
25
-
26
- // client-submit-form
27
- @POST(" signup" )
28
- @FormUrlEncoded
29
- suspend fun signup (
30
- @Field(" username" , true ) headers : String? ,
31
- @Field email : String ,
32
- @Field(" password" ) password : String ,
33
- @Field(" confirmation" ) confirmation : String ,
34
- @Field(" names" ) names : List <String >
35
- ): String
36
-
37
21
// client-submit-form
38
22
@POST(" signup" )
39
23
@FormUrlEncoded
@@ -42,18 +26,7 @@ interface KtorSamplesApi {
42
26
@Field(" username" , encoded = true ) email : List <String >
43
27
): String
44
28
45
- @Multipart
46
- @POST(" upload" )
47
- suspend fun uploadFile (
48
- @Part(" description" ) description : String ,
49
- @Part(" list" ) file : List <PartData >,
50
- @PartMap() map : Map <String , PartData >
51
- ): String
52
29
53
- @POST(" upload" )
54
- suspend fun upload (
55
- @Body map : MultiPartFormDataContent
56
- )
57
30
}
58
31
59
32
data class Query (
You can’t perform that action at this time.
0 commit comments