File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
sandbox/src/commonMain/kotlin/com/example/api Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,22 @@ 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
+
21
37
// client-submit-form
22
38
@POST(" signup" )
23
39
@FormUrlEncoded
@@ -26,7 +42,18 @@ interface KtorSamplesApi {
26
42
@Field(" username" , encoded = true ) email : List <String >
27
43
): String
28
44
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
29
52
53
+ @POST(" upload" )
54
+ suspend fun upload (
55
+ @Body map : MultiPartFormDataContent
56
+ )
30
57
}
31
58
32
59
data class Query (
You can’t perform that action at this time.
0 commit comments