SSL socket class, downloadertest application, HTTP::Downloader support for HTTPS connections, authentication, proxies and POST requests
# Conflicts: # CMakeLists.txt
This commit is contained in:
parent
17baf864d1
commit
09733c3976
2 changed files with 21 additions and 1 deletions
18
test/downloader.cpp
Normal file
18
test/downloader.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "../lib/downloader.cpp"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
if (argc < 2){
|
||||
std::cout << "Usage: " << argv[0] << " URL" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
HTTP::Downloader d;
|
||||
if (d.get(argv[1])){
|
||||
std::cout << d.data() << std::endl;
|
||||
std::cerr << "Download success!" << std::endl;
|
||||
}else{
|
||||
std::cerr << "Download fail!" << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue