Is it possible to call an http url from a .net console application? can anyone give an idea.?
public string DownloadUrl(string url)
{
return new System.Net.WebClient().DownloadString(url);
}
Maheep
Here is a nice example if you are trying to fetch HTML from a web page using HTTP.
UPDATE: As you have posted in comment that only thing you expect in response is a string would be good to use WebClient as Chris Fulstow says in his answer.
System.Net.WebClient().DownloadString(url)
Yes, its possible. Use the WebClient class. See a tutorial here http://www.dotnetperls.com/webclient
来源:https://stackoverflow.com/questions/8441595/calling-an-http-url-from-a-net-console-application