The IIS 6 Resource Kit Tools includes a tool called TinyGet to quickly issue an HTTP request to a page from a command line, and it works with IIS6 and higher (yes, you can install the resource kit tools on an IIS7 machine without problems).
Why would you want to issue HTTP GET requests from the command line? I can’t tell you how many times I have written HttpWebRequest code in a .NET command-line executable to issue a request to a page just so that I could verify the output, only to throw the program away once I am done with it. Using TinyGet and LogParser together, you can verify content in pages!
I needed this yesterday to simulate some load on my site so that I could see what happens when I call a single page many times, without having to try to refresh a bunch of browser windows quickly.
tinyget -a:2 -u:CurrentUser -srv:sp2010dev.sharepoint.com -uri:/SitePages/SlowWebPart.aspx –data
This will access the URL “http://sp2010dev.sharepoint.com/SitePages/SlowWebPart.aspx” as the current user using NTLM authentication, and display the data in the command window. Want to make sure that a particular string is in the output? Pipe the results into the FINDSTR command. For instance, we want to make sure that the string “You entered: 5” is in the output.
tinyget -a:2 -u:CurrentUser -srv:sp2010dev.sharepoint.com -uri:/SitePages/SlowWebPart.aspx –data | FINDSTR “You entered: 5”
Got a demo? Create a script that issues a request to various pages to make sure they are JIT’d and cached in memory. Besides demos, how can you use this in real life? How about when you have a users reporting outages for specific sites, and you want to verify which ones are responding? You could create a script that verifies what sites are running.
QA or operations has reported memory issues and you want to try to reproduce it and troubleshoot it in your environment?