okhttp
OkHttp proxy settings
Found the solution: OkHttpClient client = new OkHttpClient.Builder().proxy(proxyTest).build(); If we use the builder to input the proxy, it will work like a charm =D
Retrofit 2.0-beta-2 is adding literal quotes to MultiPart values
This is because it’s running through the JSON converter. Solution1: use RequestBody instead of String public interface ApiInterface { @Multipart @POST(“user/login/”) Call<SessionToken> userLogin(@Part(“username”) RequestBody username, @Part(“password”) RequestBody password); } Build RequestBody: RequestBody usernameBody = RequestBody.create(MediaType.parse(“text/plain”), usernameStr); RequestBody passwordBody = RequestBody.create(MediaType.parse(“text/plain”), passwordStr); Launch network operation: retrofit.create(ApiInterface.class).userLogin(usernameBody , passwordBody).enqueue()…. Solution2: Create a custom ConverterFactory to dispose String … Read more