ApiInterface
Source Code
@FormUrlEncoded
@POST
fun requestIdentifyService(@Url url: String,
@FieldMap body: HashMap<String, Any>): Call<JsonObject>
request ที่เขียนมาเพื่อ rewuest Identidy แต่อาจจะสามารถไปใช้งานอื่นๆได้ถ้าฟังก์ชันนี้รองรับ
Parameters
| Name | Description | Type |
|---|
| url | identify url ที่ต้องการยิง request | String |
| body | body ที่ต้องการจะแนบไปกับการยิง Request เช่น params | HashMap< String, Any > |
@GET
fun requestGet(@Url url: String): Single<JsonObject>
Parameters
| Name | Description | Type |
|---|
| url | url ที่ต้องการยิง request | String |
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPost(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
@POST(POST_URL_TAG)
fun requestPost(@Path(POST_URL_STR,encoded = true) postUrl: String = "",
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| authentication | String ที่ต้องการ Authen จะแนบไปกับการยิง Request | String | “” |
| header | header ที่ต้องการจะแนบไปกับการยิง Request | HashMap< String,String > | hashMapOf() |
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostBody(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@Body body: HashMap<String, Any> ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
@POST(POST_URL_TAG)
fun requestPostBody(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@Body body: HashMap<String, Any> ,
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| body | body ที่ต้องการจะแนบไปกับการยิง Request เช่น params | HashMap< String, Any > | |
| authentication | String ที่ต้องการ Authen จะแนบไปกับการยิง Request | String | “” |
| header | header ที่ต้องการจะแนบไปกับการยิง Request | HashMap< String,String > | hashMapOf() |
@Multipart
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@PartMap body: HashMap<String, RequestBody> ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
@Multipart
@POST(POST_URL_TAG)
@Headers(JSON_HEADERS)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@PartMap body: HashMap<String, RequestBody>): Single<JsonObject>
@Multipart
@POST(POST_URL_TAG)
fun requestPostPartMap(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@PartMap body: HashMap<String, RequestBody> ,
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| body | body ที่ต้องการจะแนบไปกับการยิง Request เช่น params | HashMap< String, RequestBody > | |
| authentication | String ที่ต้องการ Authen จะแนบไปกับการยิง Request | String | “” |
| header | header ที่ต้องการจะแนบไปกับการยิง Request | HashMap< String,String > | hashMapOf() |
@Multipart
@POST(POST_URL_TAG)
fun uploadFile(@Path(POST_URL_STR,encoded = true) postUrl: String ,
@Part file: Array<MultipartBody.Part?> ,
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| file | list ของ file ที่ต้องการจะแนบไปกับการยิง Request เช่น file sync | Array< MultipartBody.Part? > | |
| header | header ที่ต้องการจะแนบไปกับการยิง Request | HashMap< String,String > | hashMapOf() |
@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String,
@PartMap body: HashMap<String, RequestBody> ,
@Part file: Array<MultipartBody.Part> ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String,
@PartMap body: HashMap<String, RequestBody> ,
@Part file: MultipartBody.Part ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String,
@PartMap body: HashMap<String, RequestBody> ,
@Part file: Array<MultipartBody.Part> ,
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
@Multipart
@POST(POST_URL_TAG)
fun uploadFileWithBody(@Path(POST_URL_STR,encoded = true) postUrl: String,
@PartMap body: HashMap<String, RequestBody> ,
@Part file: MultipartBody.Part ,
@HeaderMap header: HashMap<String,String> = hashMapOf()): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| body | body ที่ต้องการจะแนบไปกับการยิง Request เช่น params | HashMap< String, RequestBody > | |
| file | list ของ file ที่ต้องการจะแนบไปกับการยิง Request เช่น file sync | Array< MultipartBody.Part? > | |
| file | file ที่ต้องการจะแนบไปกับการยิง Request เช่น file sync | MultipartBody.Part | |
| authentication | String ที่ต้องการ Authen จะแนบไปกับการยิง Request | String | “” |
| header | header ที่ต้องการจะแนบไปกับการยิง Request | HashMap< String,String > | hashMapOf() |
@Multipart
@POST(POST_URL_TAG)
fun requestPostWithAuthen(@Path(POST_URL_STR,encoded = true) postUrl: String = "" ,
@PartMap body: HashMap<String, RequestBody> ,
@Header(AUTHENTICATION) authentication: String = ""): Single<JsonObject>
Parameters
| Name | Description | Type | Default |
|---|
| postUrl | post url ที่ต้องการยิง request | String | “” |
| body | body ที่ต้องการจะแนบไปกับการยิง Request เช่น params | HashMap< String, RequestBody > | |
| authentication | String ที่ต้องการ Authen จะแนบไปกับการยิง Request | String | “” |