Git Product home page Git Product logo

kotlincoroutinesretrofit's Introduction

Kudzie Here!๐Ÿ‘‹

๐Ÿ“ I'm an Android Engineer working at Spotify.

๐ŸŽน I enjoy making apps and enjoy writing about making apps :D

๐Ÿ˜„ Pronouns: He/Him

โŒ˜ If you're looking for something to read. You can check out my articles on Medium. I will make time to move my content to a personal blog :D

kotlincoroutinesretrofit's People

Contributors

kudziechase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kotlincoroutinesretrofit's Issues

End of input

I have implemented this in a dummy project . I am using json value to login in my App but I am getting End of character in response.
RestrofitService

@post("/****/services/testing.php")
fun getPosts(@Body jsonRequest: String): Deferred<Response>

Login Method
private fun initLogin() {
val service = RetrofitFactory.makeRetrofitService()
GlobalScope.launch(Dispatchers.Main) {
val request = service.getPosts(Utils.jsonRequest(et_loginId.text.toString(),et_loginPwd.text.toString()))
try {
val response = request.await()
response.body()?.let {
toast("Hii")
}
} catch (e: HttpException) {
toast(e.code())
} catch (e: Throwable) {
toast(e.message.toString()) //this toast showing
}
}
}

Response JSON Format I am successfully getting when I am hitting URL.
{
"status": 1,
"message": "success",
"data": {
"sno": "1",
"unique_user_id": "1",
"username": "krishna",
"password": "AHUnB49vJMlhKk69w/Kpnw==",
"name": "krishna",
"mobile": "123",
"date": "2019/02/06",
"visible": "1"
}
}

Data Class of Feedback I just want to get status of response. So I have only used status and message.

data class Feedbacks(@SerializedName("status") var status: Int, @SerializedName("message") var message: String)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.