Help Center> Natural Language Processing> SDK Reference> Using the LU SDK> Accessing the Client via HTTP Proxies

Accessing the Client via HTTP Proxies

You can access all clients of the NLP SDK via HTTP proxies.

  • Example
//You are advised to construct and use the client in a singleton pattern to avoid frequent object creation.
NluClient client = new NluClient(AuthMode.AKSK,authInfo);

//Enable the proxy that does not require authentication. The first parameter indicates the proxy IP address, and the second parameter indicates the proxy port number.
client.setProxy("127.0.0.1",8888);

//Enable the proxy that requires authentication of the username and password. username indicates the username, and password indicates the password.
client.setProxy("127.0.0.1",8888,"username","password");