Rudig Rudig - 7 months ago 274
Java Question

Using retrofit behind a proxy

I am trying to call a Restful service with Retrofit from behind a proxy.
Is there anyway to to set proxy settings on Retrofit in the code?


Retrofit does not have options for setting any network related settings. You need to set proxy to your Retrofit http client.

Set Proxy, to your OkHttpClient using setProxy(proxy) method