Export (0) Print
Expand All

HttpPing Sample: HTTP Client Tool 

Download sample

Demonstrates making HTTP Web requests from within a console application using ATL Server's HTTP client support.

The HttpPing sample allows HTTP requests to be launched from the command line, given a URL, and displays the server response headers and response time. The sample also supports optional settings such as proxy server and authorization settings, which can be provided either on the command line, or in an .ini file.

This sample demonstrates:

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

Requirements

  • IIS

Building and Running the Sample

To build and run this sample

  1. Open the solution file, HttpPing.sln, in the Visual Studio development environment.

  2. Build the solution.

  3. Open a command prompt window from the Windows Start menu.

  4. Change the current directory to where the HttpPing.exe file is located.

  5. If your Internet connection requires the use of a proxy server, edit the HttpPing.ini file. Specify a proxy server name and port number, and set use_proxy to true.

  6. Run the sample using this syntax:

    HttpPing < URL >

Demonstrates

See Also

Community Additions

ADD
Show:
© 2014 Microsoft