The following code:
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
string Url = "http://www.tsetmc.com/t
public class WC : WebClient
{
protected override WebRequest GetWebRequest(Uri url)
{
var request = base.GetWebRequest(url) as HttpWebRequest;
request.AutomaticDecompression = DecompressionMethods.GZip;
return request;
}
}
Usage:
var url = "http://www.tsetmc.com/tsev2/data/instinfodata.aspx?i=59266699437480384&c=64";
var wc = new WC();
wc.Encoding = Encoding.UTF8;
var result = wc.DownloadString(url);