示例#1
0
        public bool Delete(ServerDto serverDto, string tenant, Token token)
        {
            tenant = Uri.EscapeDataString(tenant);
            var url = string.Format(_serviceConfigManager.GetEventLogEndPoint(), serverDto.Protocol, serverDto.ServerName, serverDto.Port, tenant);

            ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
            var requestConfig = new RequestSettings
            {
                Method = HttpMethod.Delete,
            };
            var headers  = ServiceHelper.AddHeaders(ServiceConstants.JsonContentType);
            var json     = "access_token=" + token.AccessToken + "&token_type=" + token.TokenType.ToString().ToLower();
            var response = _webRequestManager.GetResponse(url, requestConfig, headers, null, json);

            return(string.IsNullOrEmpty(response));
        }