AspHTTP allows you to GET/POST/HEAD documents using the HTTP protocol.

Features include:
  1. GET, HEAD and POST request methods
  2. Response headers are exposed
  3. Accept headers are modifiable
  4. Adjustable timeout
  5. Proxy support
  6. Custom User-Agent headers
  7. Custom Content-Type headers for POST
  8. Redirection
  9. Supports authentication areas (Basic only, NOT NTLM)
  10. Retrieves URLs to a file including binary files
  11. Allows custom HTTP request headers

Changes in AspHTTP 3.5

  1. Better support for MTS. Transactions are not supported in the 3.0 release but you should be able to incorporate AspHTTP into MTS packages without any problems. 3.5 also has performance optimizations over 3.0. 

Simple HTTP Example

Using the component is as simple as
  1. Creating the object
  2. Setting a single property
  3. Calling the GetURL method
The following code demonstrates how to use AspHTTP from VBScript.

Set HttpObj = Server.CreateObject("AspHTTP.Conn")
strResult = HTTPObj.GetURL

The variable named strResult now contains a string representing the document results from a GET of http://www.myfinancialpage.com/qrtresults.html.

POSTing Data

AspHTTP allows you to post data back to the Web server. The following example demonstrates a POST request:

Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HTTPObj.PostData = "suid=jimb&pwd=macabre&id=32&val=1.5"
HTTPObj.RequestMethod = "POST"
strResult = HTTPObj.GetURL

The variable named strResult now contains a string representing the document results from a POST to http://www.myfinancialpage.com/scripts/update3.asp.

Please refer to the following URL for details:

Add Feedback