Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 935 Bytes

File metadata and controls

40 lines (28 loc) · 935 Bytes

← Transport | Proxy(中文) | Timeout →


HTTP(S) Proxy

Default

No proxy.

Configure HTTP(S) Proxy

import com.volcengine.ApiClient;
import com.volcengine.sign.Credentials;

public class SampleCode {
    public static void main(String[] args) {
        String regionId = "cn-beijing";
        ApiClient apiClient = new ApiClient()
                .setCredentials(Credentials.getEnvCredentials())
                .setRegion(regionId)
                .setHttpProxy("http://your_http_proxy:proxy_port")
                .setHttpsProxy("http://your_https_proxy:proxy_port");
    }
}

Notes

The following environment variables are supported:

  • http_proxy / HTTP_PROXY
  • https_proxy / HTTPS_PROXY

Priority: code > environment variables.


← Transport | Proxy(中文) | Timeout →