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;
}
}
Your pathApi is not available, is the service not offline? How much do I try to access https://uatdoorway.derbysoftsec.com/ gives the error
404 page not found
– Pablo Tondolo de Vargas