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.
Properties
| Name | Type | Permission | Notes |
| 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
| Name | Arguments | Return Value | Notes |
| 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. |
Properties
| Name | Type | Permission | Notes |
| ResponseCode |
Number |
Read |
The HTTP response code. |
| LastError |
String |
Read |
The message about the last error occured to the Response object |
Methods
| Name | Arguments | Return Value | Notes |
| GetHeaderValue |
- Name or Index (String or number)
|
String |
Retreive a response header item value |
| GetHeaderName |
|
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 |
|
Boolean |
Save the response header content to a loca file. Returns true if the file is successflly saved, otherwise false |
SaveBody |
|
Boolean |
Save the response body content to a loca file. Returns true if the file is successflly saved, otherwise false |