C# 클래스 BetterHttpClient.ProxyManager

파일 보기 프로젝트 열기: Yozer/BetterHttpClient

공개 메소드들

메소드 설명
DownloadBytes ( string url, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : byte[]

Downloads url using GET.

DownloadBytes ( string url, NameValueCollection data, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : byte[]

Downloads url using POST.

GetAllProxies ( ) : List

Return all proxies

GetAvalibleProxy ( ) : Proxy

Returns first free (but busy) and working proxy.

GetPage ( string url, string requiredString = null, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : string

Downloads url using GET.

PostPage ( string url, NameValueCollection data, string requiredString = null, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : string

Downloads url using POST.

ProxyManager ( IEnumerable proxies, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService proxyJudgeService ) : System
ProxyManager ( IEnumerable proxies, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService proxyJudgeService ) : System
ProxyManager ( string file ) : System
ProxyManager ( string file, bool anonymousOnly ) : System
ProxyManager ( string file, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService service ) : System
SetAllProxyAsOnline ( ) : void

Sets all proxies IsOnline property to true.

비공개 메소드들

메소드 설명
CloneProxyList ( List proxyInput ) : List
CreateHttpClient ( NameValueCollection customHeaders = null ) : HttpClient
DownloadBytes ( string url, NameValueCollection data, Proxy proxy, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : byte[]
ParseProxies ( IEnumerable proxies ) : IEnumerable

메소드 상세

DownloadBytes() 공개 메소드

Downloads url using GET.
Page has returned 404 not found
public DownloadBytes ( string url, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : byte[]
url string
cookies System.Net.CookieContainer
customHeaders System.Collections.Specialized.NameValueCollection Specify custom headers for this request
리턴 byte[]

DownloadBytes() 공개 메소드

Downloads url using POST.
Page has returned 404 not found
public DownloadBytes ( string url, NameValueCollection data, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : byte[]
url string Url of webpage
data System.Collections.Specialized.NameValueCollection Post values
cookies System.Net.CookieContainer Cookies for request. Left null if you don't want to use cookies
customHeaders System.Collections.Specialized.NameValueCollection Specify custom headers for this request
리턴 byte[]

GetAllProxies() 공개 메소드

Return all proxies
public GetAllProxies ( ) : List
리턴 List

GetAvalibleProxy() 공개 메소드

Returns first free (but busy) and working proxy.
All proxies are banned. You can't make request.
public GetAvalibleProxy ( ) : Proxy
리턴 Proxy

GetPage() 공개 메소드

Downloads url using GET.
Page has returned 404 not found
public GetPage ( string url, string requiredString = null, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : string
url string Url of webpage
requiredString string
cookies System.Net.CookieContainer Cookies for request. Left null if you don't want to use cookies
customHeaders System.Collections.Specialized.NameValueCollection Specify custom headers for this request
리턴 string

PostPage() 공개 메소드

Downloads url using POST.
Page has returned 404 not found
public PostPage ( string url, NameValueCollection data, string requiredString = null, CookieContainer cookies = null, NameValueCollection customHeaders = null ) : string
url string Url of webpage
data System.Collections.Specialized.NameValueCollection Post values
requiredString string
cookies System.Net.CookieContainer Cookies for request. Left null if you don't want to use cookies
customHeaders System.Collections.Specialized.NameValueCollection Specify custom headers for this request
리턴 string

ProxyManager() 공개 메소드

public ProxyManager ( IEnumerable proxies, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService proxyJudgeService ) : System
proxies IEnumerable Proxy list
anonymousOnly bool Set true if you want to filter proxy list and use only anonymous only
proxyJudgeService BetterHttpClient.CheckService.ProxyJudgeService Proxy judge service is used to determine proxy anonymity level
리턴 System

ProxyManager() 공개 메소드

public ProxyManager ( IEnumerable proxies, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService proxyJudgeService ) : System
proxies IEnumerable Proxy list
anonymousOnly bool Set true if you want to filter proxy list and use only anonymous only
proxyJudgeService BetterHttpClient.CheckService.ProxyJudgeService Proxy judge service is used to determine proxy anonymity level
리턴 System

ProxyManager() 공개 메소드

public ProxyManager ( string file ) : System
file string
리턴 System

ProxyManager() 공개 메소드

public ProxyManager ( string file, bool anonymousOnly ) : System
file string
anonymousOnly bool
리턴 System

ProxyManager() 공개 메소드

public ProxyManager ( string file, bool anonymousOnly, BetterHttpClient.CheckService.ProxyJudgeService service ) : System
file string
anonymousOnly bool
service BetterHttpClient.CheckService.ProxyJudgeService
리턴 System

SetAllProxyAsOnline() 공개 메소드

Sets all proxies IsOnline property to true.
public SetAllProxyAsOnline ( ) : void
리턴 void