Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Authenticator.setDefault(new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication("userName", "S&nh@".toCharArray());
- }
- });
- final OkHttpClient client = new OkHttpClient.Builder()
- .proxy(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.123", 1080)))
- . build();
- Authenticator.setDefault(new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(USER, PASSWORD.toCharArray());
- }
- });
- retrofit = new Retrofit.Builder()
- .client(client)
- .baseUrl(URL)
- .addConverterFactory(GsonConverterFactory.create())
- .build();
Add Comment
Please, Sign In to add comment