Post a file with data streaming
This commit is contained in:
@@ -6,18 +6,15 @@
|
||||
#include "webcc/client_session.h"
|
||||
#include "webcc/logger.h"
|
||||
|
||||
void Help(const char* argv0) {
|
||||
std::cout << "Usage: file_downloader <url> <path>" << std::endl;
|
||||
std::cout << "E.g.," << std::endl;
|
||||
std::cout << " file_downloader http://httpbin.org/image/jpeg D:/test.jpg"
|
||||
<< std::endl;
|
||||
std::cout << " file_downloader https://www.google.com/favicon.ico"
|
||||
<< " D:/test.ico" << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc != 3) {
|
||||
Help(argv[0]);
|
||||
std::cout << "usage: file_downloader <url> <path>" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "examples:" << std::endl;
|
||||
std::cout << " $ file_downloader http://httpbin.org/image/jpeg D:/test.jpg"
|
||||
<< std::endl;
|
||||
std::cout << " $ file_downloader https://www.google.com/favicon.ico"
|
||||
<< " D:/test.ico" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user