Extended HTTP Requests

EXTEND: Extended HTTP Requests

(Details - Use - Extend)

In this section a short explanation on how the functionality of the building block can be extended is given. To start you will need the project files, which can be found in this ZIP package. We consider two parts of the project here:

  1. The DLL performing the HTTP requests. (as "Extending the DLL")

  2. The AdoScript providing a nicer interface to the DLL. (as "Extending the AdoScript")

The DLL that performs the actual requests is implemented in Pascal. More information on how ADOxx can be extended through DLLs in general can be found here.

The AdoScript procedures require knowledge about AdoScript, especially about AdoScript maps, how to perform calls to DLLs, and how EXECUTE can be used to achieve the right format for certain datatypes.

1. Setup of the Development environment

  • Free Pascal Compiler: This is necessary to compile the DLL and get the IDE used for Pascal running. The provided DLL was created using Free Pascal Compiler Version 3.0.0. Necessary for "Extending the DLL"

  • Lazarus IDE: The IDE used for the project where the DLL is created. The provided project was created using Lazarus IDE Version 1.6.2. Necessary for "Extending the DLL"

  • A text editor: Since the provided AdoScript is available in plain text not much beyond AdoScript knowledge is really needed to extend it. However it is recommended to use Notepad++ with the AdoScript syntax highlighting support provided here. Necessary for: "Extending the AdoScript"

2. Obtaining the Project Files

The project files for both the DLL and the AdoScript are available in this ZIP, including a Readme with some basic information as well. Extract the contents into a folder of your choice.

  • "Extending the DLL" requires the files HttpRequestDll.lpi, HttpRequestDll.lpr and HttpRequestDll.lps

  • "Extending the AdoScript" only requires the file ASC_HttpRequestDll.asc

3. Extending the Functionality

This is simple as well.

To extend the functionality of the DLL, simply open the HttpRequestDll.lpi file in Lazarus and start reading, processing and working on the code. Using the menu "Run" -> "Build" should compile the project and build the DLL file in the same folder.

To extend the functionality of the AdoScript procedures, simply open the ASC_HttpRequestDll.asc in the chosen text editor and start reading, processing and working on the code.

Proper care has been taken to document all code with enough comments.