retrofit icon indicating copy to clipboard operation
retrofit copied to clipboard

When the @Head request,the KotlinExtensions will always throw KotlinNullPointerException

Open DaveBoy opened this issue 5 years ago • 4 comments

image

image

DaveBoy avatar Mar 27 '20 07:03 DaveBoy

i found the method which not check the body is null,but it need the continuationBodyNullable in HttpServiceMethod be true,and i never found which place can change it to true,it always be false.

DaveBoy avatar Mar 27 '20 07:03 DaveBoy

i change it like this ,and it be ok.

import retrofit2.Response
...
    @HEAD
    suspend fun checkHDVideo(@Url url:String): Response<Void>

but the continuationBodyNullable in HttpServiceMethod always be false still has not solution. is that a property which for furture?

DaveBoy avatar Mar 27 '20 08:03 DaveBoy

is there any way we can pass param continuationBodyNullable into HttpServiceMethod ?

Yerlan1Fit avatar Sep 19 '22 14:09 Yerlan1Fit

Is it going to be fixed? It's disappointing that handling 204 response code requires extra effort and an ugly Response<Unit> return type.

Lingviston avatar Nov 15 '22 13:11 Lingviston