public AuthenticodeSignClient(string url, string sslSha, TcpIpSystem?tcpIp = null) { try { this.Url = url; this.Web = new WebApi(new WebApiOptions(new WebApiSettings { MaxRecvSize = Consts.Numbers.SignCodeServerMaxFileSize, SslAcceptCertSHAHashList = sslSha._SingleList() }, tcpIp)); } catch (Exception ex) { this._DisposeSafe(ex); throw; } }
public WebRet(WebApi api, string url, string contentType, byte[] data, HttpResponseHeaders headers) { this.Api = api; this.Url = url._NonNull(); this.ContentType = contentType._NonNull(); this.Headers = headers; try { var ct = new System.Net.Mime.ContentType(this.ContentType); this.MediaType = ct.MediaType._NonNull(); this.CharSet = ct.CharSet._NonNull(); } catch { this.MediaType = this.ContentType; this.CharSet = ""; } try { if (this.CharSet._IsFilled()) { this.DefaultEncoding = Encoding.GetEncoding(this.CharSet); } } catch { } if (this.DefaultEncoding == null) { this.DefaultEncoding = api.RequestEncoding; } this.Data = data._NonNull(); if (this.Api.DebugPrintResponse) { this._DebugObject(); } }