Пример #1
0
    public async Task <string> GETRequestAsync(string URL, bool useCookieContainer = false, List <NameValuePair> headers = null, bool presentUserAgent = false, string referer = null)
    {
        HttpResponseMessage response = await HC.GetAsync(new Uri(URL));

        var InputStream = await response.Content.ReadAsStreamAsync();

        using (StreamReader SR = new StreamReader(InputStream, System.Text.Encoding.UTF8))
            return(SR.ReadToEnd());
    }