HttpClient
protected override void Initialize() { base.Initialize(); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; handler = new HttpClientHandler() { ClientCertificateOptions = ClientCertificateOption.Automatic, UseDefaultCredentials = false, PreAuthenticate = false, Credentials = new NetworkCredential (Parameter.Name, Parameter.Password) }; client = new HttpClient(handler) { Timeout = new TimeSpan(0, 1, 0) }; client.DefaultRequestHeaders.Accept.Add (new MediaTypeWithQualityHeaderValue("application/json")); Result.Succeeded = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)