static public byte[] GetUrl(string url)
{ byte[] buf;
try
{
WebProxy myProxy = new WebProxy();
IWebRequestCreate req = (IWebRequestCreate)WebRequest.Create(url);
//WebRequest reqw = WebRequest.Create(req);
WebResponse response = req.GetResponse();
stream = response.GetResponseStream();
using (BinaryReader br = new BinaryReader(stream))
{
int len = (int)(response.ContentLength);
buf = br.ReadBytes(len);
br.Close();
}
stream.Close();
response.Close();
}
catch (Exception exp)
{
buf = null;
}
return (buf); }
Here url="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAAC+CAIAAACu1eR2A" like that. How to pass url IWebRequestCreate and get response ? please let you know . Its very useful for my project.
Here the url is in
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAAC+CAIAAACu1eR2A"
is not accepted . So if i am going to replace data into http or https it throws an error the url is not identified. What to do?