Beispiel #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="encoding">请求过程中所使用的编码类型</param>
 /// <param name="cookieModel">请求过程中处理Cookie的模块</param>
 /// <param name="certModel">请求过程中使用的证书模块</param>
 public LiteHttpClient(Encoding encoding, ICookieModel cookieModel = null, ICertModel certModel = null)
 {
     //初始化Cookie容器
     Encoding    = encoding;
     Timeout     = 300000;
     CookieModel = cookieModel ?? new CookieContainerModel();
     CertModel   = certModel;//new ThumbprintCertModel(thumbprint)
 }
Beispiel #2
0
 public void AddCertificate(ICertModel cert)
 {
     _certificates.Add(cert);
     cert.CreateHeaderAndInfo();
     OnPropertyChanged("Certs");
 }