retrofit
retrofit copied to clipboard
在使用协程时返回值可为空
trafficstars
在我使用协程时,我希望能在接口返回空值时能获取到空值,但是我在实际运行过程中无法获取,同时报错
Response from XXX was null but response body type was declared as non-null
然后再查看源码时发现,HttpServiceMethod中,没有调用awaitNullable的逻辑,希望能够加上这个
Use english dude.
你可以这么做 @POST(URL) suspend fun base():Bean?
你可以这么做 @post(URL) suspend fun base():Bean?
没用的 yuan'ma源码中的 continuationBodyNullable 是写死的 false

Duplicate of #3075
这个问题可以关了,关注那个就好