Advertisement
Guest User

Untitled

a guest
Feb 17th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. string xml = @"<HotelDescriptiveInfoRequest Token='Jan' UserName='username' Password='Password'>
  2. <HotelDescriptiveInfos Language='' >
  3. <HotelDescriptiveInfo HotelCode='HY-VISTA'/>
  4. </HotelDescriptiveInfos>
  5. </HotelDescriptiveInfoRequest>";
  6.  
  7. var content = new StringContent(xml, Encoding.UTF8, "text/xml");
  8. httpClient.DefaultRequestHeaders.Authorization = AuthenticationHeaderValue.Parse("xptohemlmi");
  9.  
  10. var response = httpClient.PostAsync(pathApi, content).Result;
  11.  
  12. if (response.IsSuccessStatusCode)
  13. {
  14. var result = response.Content.ReadAsStringAsync().Result;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement