protected RestResponse call(REQUEST_TYPE requestType, InputStream content, Map params) {
        
        OutputStream os;
        RestResponse res = null;
        HttpURLConnection connection;
        Map.Entry<String, String> entry;
        
        try {
            int value = -1;
            connection = (HttpURLConnection) destinationUrl.openConnection();
            
            
            connection.setInstanceFollowRedirects(false); 
            connection.setRequestMethod(requestType.toString());
            System.out.println("Request Method is: " + connection.getRequestMethod());
            
            for (Object param:params.entrySet()) {
                entry = (Map.Entry<String, String>) param;
                connection.addRequestProperty(entry.getKey(), entry.getValue());
            }
            
            if (content != null) {
                
                connection.setDoOutput(true);
                value = content.read();
                
                os = connection.getOutputStream();    
            
                while (value > -1) {
                    os.write(value);
                    value = content.read();
                }

                os.flush();
            }

            res = new RestResponseImpl(connection); 
 
            connection.disconnect(); 
            
        } catch(Exception e) { 
             e.printStackTrace();
        }
        
        return res;
    }