# Class DeviceInfo#setProxyInfo

DeviceInfo

- Defined in: deviceInfo.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| DeviceInfo#setProxyInfo(successCallback, errorCallback, options) Sets Proxy Info

## Class Detail

DeviceInfo#setProxyInfo(successCallback, errorCallback, options)
Sets Proxy Info

    // Javascript code
    function setProxyInfo () {
     var options = {
        enabled : true,
        ipAddress : "163.231.22.43",
        port : 5000,
        userName : "example",
        password : "35792234",
     };
     function successCb() {
        console.log("sucess");
        // Do something
     }
     function failureCb(cbObject) {
        var errorCode = cbObject.errorCode;
        var errorText = cbObject.errorText;
        console.log ("Error Code [" + errorCode + "]: " + errorText);
     }
     var deviceinfo = new DeviceInfo();
     deviceinfo.setProxyInfo(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  enabled | Boolean | proxy is enabled true : enabled, false : disabled | required
  ipAddress | String | proxy server ip (when 'enabled' is true, it is required) | optional
  port | Number | proxy server port (0 ~ 65535) (when 'enabled' is true, it is required) | optional
  userName | String | proxy server username (when 'enabled' is true and authentication is used by proxy server, it is required) | optional
  password | String | proxy server password (when 'enabled' is true and authentication is used by proxy server, it is required) | optional

Since:
  1.4
Returns:

  If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with a failure callback object as a parameter.

See:
  DeviceInfo.getProxyInfo()