Rest API - Get activity (using c#)
Content
Hello,
I'm trying to connect Rest API to use "get activity", but the response is always "The underlying connection was closed". I already tried with "SecurityProtocolType", "ContentLength=0", "KeepAlive=false", ...
I already tested in Postman with success.
Thank you.
Version
Field Service CloudCode Snippet
var request = HttpWebRequest.Create(string.Format(url, Uri.EscapeDataString("rest-client (ssl-basic auth)"))) as HttpWebRequest; const string login = "user@domain"; const string password = "pass"; string encoded = "Basic " + Base64EncodeHelper.EncodeUtf8To64(string.Format("{0}:{1}", login, password)); request.Accept = @"application/json"; request.Headers.Add("Authorization", encoded); HttpWebResponse response = (HttpWebResponse)request.GetResponse();
0