Skip to content

Generic Api Service For Kotlin (Get-Put-Post-Delete + Token Header)

Notifications You must be signed in to change notification settings

hasansahinnn/Kotlin_Generic_Api_Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kotlin_Generic_Api_Service

Generic Api Service For Kotlin (Get-Put-Post-Delete + Token Header)

implement IHttpModel to your Class

Add this prop like

  • @Transient override var dataList: MutableList?= mutableListOf()
  • @Transient : That code removes dataList properties when you serialize

------------------ Usage ----------------

 val apiBaseClient=ApiClient("")

 apiBaseClient.Get<Users>(Users(),"users/1"){ isSuccess, response, message ->
     if (isSuccess)
         println(response)
    else 
         println(message)
 }

About

Generic Api Service For Kotlin (Get-Put-Post-Delete + Token Header)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages