question

Upvotes
Accepted
1.2k 24 31 45

How to use DSS/REST API examples behind a proxy?

dss-rest-apidatascope-selectdssrest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
1.2k 24 31 45

The examples need to be modified to create a HttpClient that respects the Java system properties for HTTP proxies and then the system properties need to be defined upon execution.

HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().build();
// or
HttpClient httpClient = HttpClients.createSystem();

Execute the Java application with the following additional properties:

-Dhttps.proxyHost=<proxy hostname or ip>-Dhttps.proxyPort=<proxy port>

Example:

java -Dhttps.proxyHost=10.86.33.20 -Dhttps.proxyPort=80 -jar app.jar
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
1.1k 5 3 5

For the .Net Sample app, if the system default proxy does not work, you can force a specific proxy by adding this to the app.config file (using your proxy values of course):

<configuration>
...
    <system.net>
        <defaultProxy>
            <proxy usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" bypassonlocal="True" />
        </defaultProxy>
    </system.net>
</configuration>


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

I had the same problem with my new proxy provider, this may be a problem with the provider, or is it my settings? thank you in advance

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@nextersen

Proxy settings depend on what program or language you are using. The answers above explain how to setup the proxy parameters for Java and .Net.

Assuming your proxy parameters are correct (you can get them from your provider or local IT administrator), you should be able to connect fine. Proxy parameters are usually an IP address (or hostname) and a port. In some cases there might also be a username and password.

If you still need help, please give more details on your environment and setup.

Upvote
465 3 5 3

Version 10.6 of the .Net SDK supports setting the proxy on the context. For example:

context.Options.Proxy = new WebProxy("127.0.0.1", 8888);
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.