コード例 #1
0
 public SocketHttpRequest(SocketFactory socketFactory, Uri url, int nbRetry)
 {
     Method         = HttpMethod.GET;
     Url            = url;
     _socketFactory = socketFactory;
     _nbRetry       = nbRetry;
     Headers        = new Dictionary <string, string>
     {
         { "Host", url.Host },
         { "User-Agent", "WebsiteCrawler/1.0" },
         { "Accept-Encoding", "gzip" },
     };
 }
コード例 #2
0
 public SocketHttpDataProvider(int nbRetry)
 {
     NbRetry = nbRetry;
     Sockets = new SocketFactory(new HostProvider());
 }