Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement