|
Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
Working with HTTP Functions
The LEADTOOLS HTTP functions allow you to connect to Internet servers and issue requests. These functions 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 L_InetHttpConnect to connect 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 L_InetHttpOpenRequest to open the request to the Internet server. No data can be sent to the Internet server without first calling L_InetHttpOpenRequest.
After a valid request has been opened, several actions can be taken. Simulate a user sending a form to the server with L_InetHttpSendForm. Send raw data using L_InetHttpSendData. Finally, send a bitmap with L_InetHttpSendBitmap. If it is not necessary to send any particular data, the L_InetHttpSendRequest function can be used to send the request.
Once the request has been sent to the Internet server, the status can be retrieved using L_InetHttpGetServerStatus. If the Internet server sent, any data back in its response L_InetHttpGetResponse can be used to get the response data.
After the request is finished, call L_InetHttpCloseRequest to close the request. When no more requests are needed, call L_InetHttpDisconnect to disconnect from the Internet server.