Ich habe nach einer Kombination von Headern und Body für die Post-Anfrage gesucht.
Einrichten der Header mit HttpRequestMessage.
Code: Select all
HttpClient clientTest = new HttpClient();
HttpRequestMessage httpRequest = new HttpRequestMessage(HttpMethod.Post,url);
httpRequest.Content = new StringContent(string.Empty, Encoding.UTF8, "application/vnd.citrix.sessionparams+xml");
httpRequest.Headers.Authorization = new AuthenticationHeaderValue("CitrixAuth", "H4sIAAAAAAAEAK1X2Y6jyBL9lZLnEbnZt1J");
Code: Select all
XDocument xml = XDocument.Load("RequestSession.xml");
Code: Select all
var httpContent = new StringContent(xml.Document.ToString(), Encoding.UTF8, "application/vnd.citrix.sessionstate+xml");
Mobile version