Hi past two days, i was building libcurl( the curl dll for c++ ) under various operating system. It was quite hard, because it need another libraries like openssl and libssh.
Anyhow, i completed all this and i have 4 plugins (for 32/64/windows/linux) for vcmp server.
It's only function is this:
SendRequest("https://www.example.com", function(data){ //do something with data } );
Yes, it sends
a get request and calls the given function when receiving data.
Download links
curlget-binaries.zip (https://www.mediafire.com/file/ru5hdqyexzzc8mm/curlget-binaries.zip/file)
Function Documentation1. SendRequest( [string]url, callback )
url: the url to connect to
callback: the one parameter function (like print) which will be called when data is received.
returns null always
Notes1. SendRequest is not blocking call.
Limitations1. post request is not supported.
Example code and outputSendRequest("https://www.example.com",print)
Output
(https://i.imgur.com/qGCw5Ys.png)
Source code1. curlget-source.zip (https://www.mediafire.com/file/zpc43uy28edjmqk/curlget-source.zip/file)
2. It needs curl library to compile. I am including the libcurl binaries compiled by me ( with openssl in linux, and windows sspi in windows ).
libcurl-binaries.zip (https://www.mediafire.com/file/09nhsxxxucf4zc1/libcurl-binaries.zip/file)
Building from sourceHow to build from source?
-------------------------
To build you need libcurl libraries and curl include directory in hand. I have libcurl.so in /home/user/libcurl/lib and curl include files are in the folder curl of this project.
../curlget$ mkdir out2
../curlget$ cd out2
../out2$ cmake ../ -DCURL_LIBRARY=/home/user/libcurl/lib/libcurl.so -DCURL_INCLUDE_DIR=../curl
-- Found CURL: /home/user/libcurl/lib/libcurl.so
-- Configuring done
-- Generating done
-- Build files have been written to: ***/curlget/out2
../out2$ cmake --build .
[ 50%] Linking CXX shared module curlget04rel64.so
Copying to output directory
[100%] Built target curlget
On Windows, you need the
static libcurl library and not (*.dll)
For building for 32bit in a 64 bit linux, add -DFORCE_32=1
For building 32 bit in windows, add -DCMAKE_GENERATOR_PLATFORM=Win32
Attributions"This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
"This product includes cryptographic software written by
* Eric Young ([email protected])"