class InspectorResourceImpl implements InspectorResource {
    @Autowired
    private RestTemplate loadBalancedRestTemplate;

    @Override
    public String inspect(String protocol, String portal, String path, List<String> service, Map<String, String> header, List<String> filter) {<FILL_FUNCTION_BODY>}

    @Override
    public List<Map<String, String>> inspectToList(String protocol, String portal, String path, List<String> service, Map<String, String> header, List<String> filter) {
        String result = inspect(protocol, portal, path, service, header, filter);

        return PluginInfoUtil.assembleAll(result, filter);
    }
}

        String url = protocol + "://" + portal + UrlUtil.formatContextPath(path) + DiscoveryConstant.INSPECTOR_ENDPOINT_URL;

        InspectorEntity inspectorEntity = new InspectorEntity();
        inspectorEntity.setServiceIdList(service);

        if (MapUtils.isNotEmpty(header)) {
            HttpHeaders headers = new HttpHeaders();
            for (Map.Entry<String, String> entry : header.entrySet()) {
                headers.add(entry.getKey(), entry.getValue());
            }

            HttpEntity<InspectorEntity> requestEntity = new HttpEntity<InspectorEntity>(inspectorEntity, headers);

            String result = loadBalancedRestTemplate.exchange(url, HttpMethod.POST, requestEntity, InspectorEntity.class, new HashMap<String, String>()).getBody().getResult();

            return PluginInfoUtil.extractAll(result, filter);
        }

        String result = loadBalancedRestTemplate.postForEntity(url, inspectorEntity, InspectorEntity.class).getBody().getResult();

        return PluginInfoUtil.extractAll(result, filter);
    
<no_super_class>