Definition at line 56 of file http-client.cpp.
◆ HTTPClientFuzzer()
| HTTPClientFuzzer::HTTPClientFuzzer |
( |
| ) |
|
|
inline |
◆ init()
| int HTTPClientFuzzer::init |
( |
| ) |
|
|
virtual |
◆ run()
| int HTTPClientFuzzer::run |
( |
const std::string & | filename | ) |
|
|
virtual |
Implements Fuzzer.
Definition at line 72 of file http-client.cpp.
73{
74 std::string s;
75
77 {
78 std::cout << "Error: failed to load file " << filename << std::endl;
79 return 1;
80 }
81 try
82 {
83 client.test(s, std::chrono::milliseconds(1000));
84 }
85 catch (const std::exception &e)
86 {
87 std::cerr << "Failed to test http client: " << e.what() << std::endl;
88 return 1;
89 }
90 return 0;
91}
bool load_file_to_string(const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/fuzz/http-client.cpp