kotlin-coroutines-okhttp icon indicating copy to clipboard operation
kotlin-coroutines-okhttp copied to clipboard

Update the OkHttp version this depends on

Open StylianosGakis opened this issue 2 years ago • 1 comments

Hey, I was having an issue with the IDE I supposed while using this library which I think would be solved by bumping which OkHttp version this depends on.

Since this pulls an earlier version of OkHttp, it somehow makes it so that when I am calling methods like .body on a Response object, the IDE looks at the older version and returns a String instead of a ResponseBody. It would make our lives inside the IDE if this was updated. I think this may be happening since we're transitively depending on OkHttp from some other dependency, so we're using 4.x.x on runtime and the IDE sees the 3.x.x version. Not sure though. It seems like importing this library or copying the method it provides is still the only way to use okhttp with coroutine support, which is why we're still using it. Is this something you use yourself as well? Maybe there are some alternatives I'm missing out on which is why you haven't felt the need to update what this library depends on? Or have you not encountered this IDE problem that I am referring to?

StylianosGakis avatar Mar 18 '22 10:03 StylianosGakis

I found this actually, describes what I was experiencing as well https://stackoverflow.com/questions/59158745/okhttp4-cannot-access-body-it-is-package-private-in-response I hope it helps you with some context

StylianosGakis avatar Mar 18 '22 12:03 StylianosGakis