Connect Through a Proxy

Connect Through a Proxy
If you have difficulties connecting to your REST API from your programming environment, but API Creator is working as expected, the most likely explanation is that your browser is using a proxy to connect to the web. This is common in large organizations, and is typically used to filter web traffic for security reasons.
If so, look at your browser settings and determine the address and port number of your proxy server. After you have this information, setting up your program to use the proxy depends on your programming platform.
In Java, failure to connect shows as an exception similar to the following:
Exception in thread "main" org.apache.http.conn.HttpHostConnectException: Connection to refused        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(        at        at        at org.apache.http.impl.client.DefaultRequestDirector.execute(        at org.apache.http.impl.client.AbstractHttpClient.execute(        at org.apache.http.impl.client.AbstractHttpClient.execute(        at org.apache.http.impl.client.AbstractHttpClient.execute(
To use a proxy:
  1. Set the following system properties: 
    System.setProperty("http.proxyHost", "proxyname"); // Enter your proxy name here System.setPropery("http.proxyPort", "8080");
  2. If the proxy requires authentication, add the following: 
    Authenticator authenticator = new Authenticator() {     public PasswordAuthentication getPasswordAuthentication() {         return (new PasswordAuthentication("user", "password".toCharArray()));     } }; Authenticator.setDefault(authenticator);
JavaScript in the browser uses the browser's proxy settings, and therefore should never be a problem. You can have server-side JavaScript (for example, Node.js) use a proxy by routing all traffic through the proxy, for example:
var http = require('http'); var google = http.createClient(3128, ''); var request = google.request('GET', '/',   {'host': ''}); request.end();
Other languages have different conventions, which also depend on which frameworks and libraries you might be using.