Patreon / patreon-java

Interact with the Patreon API via OAuth
Apache License 2.0
52 stars 26 forks source link

add proxy feature #33

Open kimsung604 opened 4 years ago

phildini commented 4 years ago

Hi! Could we get a bit more on what this PR is trying to solve? Thanks.

kimsung604 commented 4 years ago

Sometimes, due to security policy issues, Web Application Server cannot directly access the external network, so you must only access the external network through the Proxy Server. So there needs to be a way to call the patreon api through a proxy server. like this


Proxy proxy = new Proxy(Type.HTTP, new InetSocketAddress("proxy.server1.com", 19002));

// auth
PatreonOAuth patreonOAuth = new PatreonOAuth(clientId, clientSecret,redirectUri, proxy);
patreonOAuth.getToken(code);

// api
PatreonAPI api = new PatreonAPI(accessToken, proxy);
api.fetchCampaigns();
...