Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

C# Rest API to Deployment Server

$
0
0
I am trying to connect to the deployment server using C# and REST. I can connect to the search Head over HTTPS but I get error: "The underlying connection was closed: when trying to connect to this URI: http://depl_server:8089/service/auth/login Is this not possible? VS2015: code: if (!string.IsNullOrEmpty(sessionKey)) req.Headers.Add("Authorization", "Splunk " + sessionKey); if (httpMethod == "POST") { if (!string.IsNullOrEmpty(args)) req.ContentLength = args.Length; req.ContentType = "application/x-www-form-urlencoded"; Stream reqStream = req.GetRequestStream(); StreamWriter sw = new StreamWriter(reqStream); sw.Write(args); sw.Close(); }

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>