BetterHttpClient.ProxyManager.DownloadBytes C# (CSharp) Метод

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[]
        public byte[] DownloadBytes(string url, NameValueCollection data, CookieContainer cookies = null, NameValueCollection customHeaders = null)
        {
            int limit = 0;

            do
            {
                Proxy proxy = GetAvalibleProxy();

                try
                {
                    if (AnonymousProxyOnly && !proxy.IsAnonymous(ProxyJudgeService))
                    {
                        continue;
                    }

                    byte[] result = DownloadBytes(url, data, proxy, cookies, customHeaders);

                    if (result != null)
                    {
                        return result;
                    }
                }
                finally
                {
                    limit++;
                    proxy.IsBusy = false;
                }

                limit++;
            } while (limit < _numberOfAttemptsPerRequest);

            throw new AllProxiesBannedException();
        }

Same methods

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