File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
include_directories (${CPP-NETLIB_SOURCE_DIR})
7
7
include_directories (${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/src)
8
+ include_directories (${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/include )
8
9
if (OPENSSL_FOUND)
9
10
include_directories (${OPENSSL_INCLUDE_DIR} )
10
11
endif (OPENSSL_FOUND)
Original file line number Diff line number Diff line change @@ -29,22 +29,22 @@ int main(int argc, char* argv[]) {
29
29
;
30
30
31
31
options.parse_positional (std::vector<std::string>{" source" });
32
- options.parse (argc, argv);
32
+ auto optionsResults = options.parse (argc, argv);
33
33
34
- if (options .count (" help" )) {
34
+ if (optionsResults .count (" help" )) {
35
35
std::cout << options.help ({" " , " Group" }) << std::endl;
36
36
return EXIT_SUCCESS;
37
37
}
38
38
39
- if (options .count (" source" ) < 1 ) {
39
+ if (optionsResults .count (" source" ) < 1 ) {
40
40
std::cout << " Error: Source URL required." << std::endl;
41
41
std::cout << options.help ({" " , " Group" }) << std::endl;
42
42
return EXIT_FAILURE;
43
43
}
44
44
45
- std::string source = options [" source" ].as <std::string>();
46
- bool show_headers = options .count (" headers" ) ? true : false ;
47
- bool show_status = options .count (" status" ) ? true : false ;
45
+ std::string source = optionsResults [" source" ].as <std::string>();
46
+ bool show_headers = optionsResults .count (" headers" ) ? true : false ;
47
+ bool show_status = optionsResults .count (" status" ) ? true : false ;
48
48
49
49
http::client::request request (source);
50
50
http::client::string_type destination_ = host (request);
You can’t perform that action at this time.
0 commit comments