Ejemplo n.º 1
0
        public async Task <IPingResponse> PlacementCheckAsync(IPingRequest request)
        {
            var urlString    = $"{SemServiceEndpoint}/Ping?{request.ToQuerystring()}";
            var xmlString    = await new HttpClient().GetStringAsync(new Uri(urlString)).ConfigureAwait(false);
            var pingResponse = XmlConvert.DeserializeObject <PingResponse>(StripNamespacesFromPingResponseRoot(xmlString));

            if (!pingResponse.IsSuccess)
            {
                ErrorSignal.FromCurrentContext().Raise(new Exception($"SEMProxyService:PlacementCheckAsync - {pingResponse.RejectedReason} | {request.ToQuerystring()}"));
            }

            return(pingResponse);
        }