My GET request returns 204. I tried with Deferred, suspend, Call.
Then I added a breakpoint for debugging.
It returns 200 when I set a breakpoint before checking for a successful response and check null body.
Help me figure out why this happened and how I will fix it.
Request with Postman returns 200. Why without a breakpoint it returns 204?
Retrofit version : 2.9.0
With Call:
@GET("endpoint/{uuid}/") fun getApplicationAsync( @Path("uuid") uuid: String, ): Call<ApplicationResponse>
With Deferred:
@GET("endpoint/{uuid}/") fun getApplicationAsync( @Path("uuid") uuid: String, ): Deferred<ApplicationResponse>
With suspend:
@GET("endpoint/{uuid}/") suspend fun getApplication( @Path("uuid") uuid: String, ): ApplicationResponse
https://stackoverflow.com/questions/66740131/android-retrofit-get-request-returns-204-but-attaching-debugger-with-break-poin March 22, 2021 at 11:52AM
没有评论:
发表评论