software products and customization
Contact: support@xuebrothers.net ActiveWEBC Home Page

ActiveWEBC Programming Interfaces


Before you can use the ActiveWEBCC control, you must register it with the Windows system. This is can be done by your application's setup program or using "regsvr32.exe" provided by Windows.

For DotNet programming languages such as C# or Visual Basic, you also need to "Add Reference" to ActiveWEBC and Add "using ACTIVEWEBCLib;" to the beginning of your source codes. See the C# sample codes for how to do this.

The Request Interface

Properties
NameTypePermissionNotes
Method String Read/Write The HTTP request method, such as GET, HEAD, POST, etc
Host String Read/Write The domain name of the web server
Path String Read/Write The HTTP request URI. (or called active URL)
LastError String Read The message about the last error occured to the Request object
SSL Boolean Read/Write Typically set to true for https.
Methods
NameArgumentsReturn ValueNotes
AddHeaderItem
  • Name (String)
  • Value (String)
Add an entry to the HTTP request header
AddFormText
  • Name (String)
  • Value (String)
Add an form entry of text type to the HTTP request header
AddFormFile
  • Name (String)
  • Value (String)
Add an form entry of file type to the HTTP request header
DoRequest Response object If failed, a null object wiil be returned, and LastError has the error details. See below for details about Response.

The Response Interface

Properties
NameTypePermissionNotes
ResponseCode Number Read The HTTP response code.
LastError String Read The message about the last error occured to the Response object
Methods
NameArgumentsReturn ValueNotes
GetHeaderValue
  • Name or Index (String or number)
String Retreive a response header item value
GetHeaderName
  • Index (Number)
String Retreive a response header item name
GetHeader String Retreive a response header
GetBody String Retreive a response body. You should carefully use this method, because the body may not be of text type. Check "Content-Type" using GetHeaderValue before call this method.
SaveHeader
  • File Name (String)
Boolean Save the response header content to a loca file. Returns true if the file is successflly saved, otherwise false
SaveBody
  • File Name (String)
Boolean Save the response body content to a loca file. Returns true if the file is successflly saved, otherwise false