sdk/java/src/main/java/com/example/www/controllers/BlacklistIPAddressesController.java
/**
     * Builds the HttpRequest object for list
     */
Builds the HttpRequest object for list
Builds the HttpRequest object for list
private HttpRequest _buildListRequest() throws IOException, APIException {
        String _baseUri = Configuration.getBaseUri();
        StringBuilder _queryBuilder = new StringBuilder(_baseUri + "/v1.1/blacklists/ipaddresses");
        String _queryUrl = APIHelper.cleanUrl(_queryBuilder);
        Map<String, String> _headers = new HashMap<String, String>();
        _headers.put("user-agent", BaseController.userAgent);
        _headers.put("accept", "application/json");
        HttpRequest _request = getClientInstance().get(_queryUrl, _headers, null);
        if (getHttpCallBack() != null) {
            getHttpCallBack().OnBeforeRequest(_request);
        }
        CustomAuthUtility.appendCustomAuthParams(_request);
        return _request;
    }
private HttpRequest _buildListRequest ( ) throws IOException , APIException { String _baseUri = Configuration . getBaseUri ( ) ; StringBuilder _queryBuilder = new StringBuilder ( _baseUri + "/v1.1/blacklists/ipaddresses" ) ; String _queryUrl = APIHelper . cleanUrl ( _queryBuilder ) ; Map < String , String > _headers = new HashMap < String , String > ( ) ; _headers . put ( "user-agent" , BaseController . userAgent ) ; _headers . put ( "accept" , "application/json" ) ; HttpRequest _request = getClientInstance ( ) . get ( _queryUrl , _headers , null ) ; if ( getHttpCallBack ( ) != null ) { getHttpCallBack ( ) . OnBeforeRequest ( _request ) ; } CustomAuthUtility . appendCustomAuthParams ( _request ) ; return _request ; }
Builds the HttpRequest object for list
Builds the HttpRequest object for list
//the base uri for api requests //prepare query string for API call //validate and preprocess url //load all headers for the outgoing API request //prepare and invoke the API call request to fetch the response // Invoke the callback before request if its not null // Custom Authentication to be added for authorization