Set a Kong Unirest route before the first request activates its client:

Unirest.config().proxy("proxy.example", 8080);

HttpResponse<String> response = Unirest
    .get("https://www.example.com/")
    .asString();

Before activating a fresh instance for permitted public requests, an HTTP address from the HTTP proxy list can fill the example’s host and port without a proxy account. The documented proxy overload also accepts username/password from application configuration. They do not belong in the destination URL.

For a deliberately property-driven policy, opt in instead:

Unirest.config().useSystemProperties(true);

A JVM property existing does not make every HTTP client read it. Choose the source during initialization; options used to construct an activated client require explicit shutdown or reset before they can change.

For distinct configurations, use Unirest.spawnInstance() and send through that same instance. The static primary instance does not configure a spawned one, and a shared activated client should not be toggled around concurrent requests.

Older com.mashape examples using Unirest.setProxy(HttpHost) belong to another API. Match that dependency rather than combining its entry point with Kong's configuration.

Related articles