I have a page that performs several tasks. This page is open to system end users, who can access it via the browser.
In certain situations I would like to trigger page rendering with a console application. Something like:
using System.Net;
/* .. SNIP .. */
WebClient foo = new WebClient();
foo.DownloadString("http://siteDaAplicacao.com.br/Pagina.aspx");
My problem: all methods of the WebClient class, as far as I know, will bring the full HTTP response from the server. So even if I do not use the answer - for example, by calling the asynchronous version of the WebClient.DownloadString
method, at some point a string will come into the console application with the representation of all the HTML that my page normally mounts.
Is there any way in .NET to make an HTTP request (preferably but not necessarily GET) and tell the server that I do not want the response?