C # client response Error 502: Bad Gateway - how to solve?

1
 using (var httpClient = new HttpClient())
            {
                var request = new HttpRequestMessage();
                string pathApi = "https://uatdoorway.derbysoftsec.com/xml/hoteldescriptiveinfo/username/";

                string xml = @"<HotelDescriptiveInfoRequest Token='Jan' UserName='username' Password='Password'>
                                <HotelDescriptiveInfos Language='' >                                         
                                        <HotelDescriptiveInfo HotelCode='HY-VISTA'/>
                                </HotelDescriptiveInfos>
                                </HotelDescriptiveInfoRequest>";

                var content = new StringContent(xml, Encoding.UTF8, "text/xml");
                httpClient.DefaultRequestHeaders.Authorization = AuthenticationHeaderValue.Parse("xptohemlmi");

                var response = httpClient.PostAsync(pathApi, content).Result;

                if (response.IsSuccessStatusCode)
                {
                    var result = response.Content.ReadAsStringAsync().Result;
                }
            }
    
asked by anonymous 17.02.2017 / 20:27

0 answers