How to Program with the LEAD Raster HTTP Object

The LEAD Raster HTTP Object allows a user to connect to Internet servers and issue requests. Its methods and properties allow you to interact with Internet servers without requiring the use of an Internet Browser.

The first step in working with an Internet server is to use InetHttpConnect to connect to the desired Internet server. After connecting with the Internet server, designate what page, cgi script, asp script, file, or executable will be the target of the request to the Internet server. Once the target has been decided, call InetHttpOpenRequest to open the request to the Internet server. No data can be sent to the Internet server without first calling InetHttpOpenRequest.

After a valid request has been opened, several actions can be taken. Simulate a user sending a form to the server with InetHttpSendForm. Send raw data using InetHttpSendData. Finally, send a bitmap with InetHttpSendBitmap. If it is not necessary to send any particular data, the InetHttpSendRequest method can be used to send the request.

Once the request has been sent to the Internet server, the status can be retrieved using InetHttpGetServerStatus. If the Internet server sent any data back in its response InetHttpGetResponse can be used to get the response data.

After the request is finished, call InetHttpCloseRequest to close the request. When no more requests are needed, call InetHttpDisconnect to disconnect from the Internet server.