What's the difference between Retrofit and okHttp?
n
What's the difference between Retrofit and okHttp?
😶 4
google 4
c
okhttp is a http client and retrofit is for rest apis
it uses okhttp
n
So, Both of them do the same work of fetching the data from the server, don't they?
c
Probably belongs in #C09222272 Not really kotlin related and therefore shouldn't be in #C0922A726
👍 1
m
@Nikhil okhttp is lower level. It can handle http requests to the server. Retrofit is built on top of okhttp for handling rest apis specifically and make their use friendlier. If you're asking, you probably want to use retrofit.
☝️ 1
a
Retrofit itself is just a higher abstraction of doing network requests. It doesn't do networking itself so you need OkHttp anyway.
n
Thanks @Michal Klimczak