Version: 1.8.4
Communicate with Web Servers from a client application using HTTP and HTTPS.

Web ActiveX Control (HTTP, HTTPS)

The Web control is used to communicate (send GET and POST requests) with HTTP and HTTPS servers. Features include:

  • Secure connections fully supported.
  • Easily fetch a complete web page with only one method call.
  • Simulate form posts.
  • Send cookies or custom headers.
  • Post files.

Development Environments

  • Visual Studio .NET (.NET Framework)
  • Visual Basic (VB)
  • Visual C++ (VC++)
  • FoxPro
  • PowerBuilder
  • Delphi
  • C++ Builder
  • ASP
  • Office 97/2000

Interface

Public Properties
Blocked A True value indicates the control is currently executing a blocking method (Timeout is greater than 0), which has neither completed nor timed out with a ptTimeout error.
Cache Returns or sets a value that enables internal caching for all GetEx and Get method calls.
CacheEx Allows extended caching properties to be set.
Cookies Returns or sets a value that determines whether cookies are automatically handled.
HostPort Returns the port number of the remote host.
Proxy Returns or sets a value that specifies a proxy host for communications with servers. Can be either a host name (proxy.dart.com) or dot address (nnn.nnn.nnn.nnn), optionally followed by a colon and remote port.
ProxyBypass A collection of remote hosts that will bypass proxy support.
ProxyPassword Password to be sent on all requests routed through a proxy server.
ProxyUsername Username to be sent on all requests routed through a proxy server.
Redirect Determines if auto redirection is to take place.
Security Returns or sets security level when accessing a secure server.
State The State event fires to signal that this property has changed in value. It can be used to provide status information to the user interface.
Status Response code from the last completed HTTP request.
StatusText Response text of the last completed HTTP request.
Timeout Controls the blocking behavior of methods that can be used in blocking and non-blocking ways.
Url Returns or sets the URL (uniform resource locator) to use when invoking the Get, Head, Post, and Put methods.
UrlExtra Returns the extra part (everything in a URL following the path) of the Url property.
UrlPath Returns the path part of the Url property.
UrlRemoteHost Returns the remote host part of the Url property.
UrlScheme Returns the scheme part of the Url property.
UserAgent Returns or sets a value that identifies the user agent in all communications with a server.
Version Returns or sets a value that selects the version of the HTTP Protocol to use.
Public Methods
Abort Abort any blocking method and release all system resources.
About Show the About Box.
Get Get content (a web page) from a server.
GetEx Get content (a web page) from a server.
Head Get HTML headers.
Post Post data to an HTTP server.
Put Put content to a server.
Public Events
Error Fires when an error condition occurs.
Progress The GetEx, Get, Post, Head and Put methods transfer data between the server and your application. During the transfer process, this event fires periodically to indicate progress.
State Fires to indicate that the State property has changed value.

Code Example

How easy is the Web Control to use? Check out the following VB example below, which demonstrates grabbing an HTML file and displaying the data.

Dim Orderform As String

Http1.Timeout = 20000 'give it 20 seconds to complete

Http1.Url = "http://www.dart.com/" ' Specify the URL to GET

Http1.Get Orderform ' Send a GET request, Orderform will be filled with data

Text1.Text = Orderform 'The HTML code for the web site appears in the text box