Set Up A Proxy

The Data Client Base Library allows to configure a proxy server for connecting to the HERE platform. You can configure a proxy either programmatically or in the application.conf file.

Programmatic Configuration

When you create any instance of BaseClient, you can pass a custom Settings object that specifies your proxy configuration:

To configure your proxy programmatically, add the following:

val proxyPort = 8080
val proxyHost = "localhost"
val proxyLogin = "user"
val proxyPass = "pass"
val proxySettings =
  ProxySettings(proxyHost, proxyPort, Some(ProxyCredentials(proxyLogin, proxyPass)))

val client = BaseClient(proxySettings = Some(proxySettings))
val metadataApi = client.of[MetadataApi]
int proxyPort = 8080;
String proxyHost = "localhost";
String proxyLogin = "user";
String proxyPass = "pass";
ProxySettings proxySettings =
    new ProxySettings.Builder()
        .withCredentials(new ProxyCredentials(proxyLogin, proxyPass))

BaseClient client = new BaseClientJava.Builder().withProxySetting(proxySettings).build();
MetadataApi metadataApi = new MetadataApi(client);

Configuration in the Properties File

Use the following code snippet in your properties file to configure your proxy in the application configuration: {
    proxy {
        host = "localhost"
        port = 9999
        credentials {
            username: "user"
            password: "pass"

For more details on configuration properties, see the Configuration chapter.

results matching ""

    No results matching ""