/////////////////////////////////////////////////////// Entry point of application \return Application exit code ///////////////////////////////////////////////////////
| 82 | /// |
| 83 | //////////////////////////////////////////////////////////// |
| 84 | int main() |
| 85 | { |
| 86 | // Ask for the complete webpage URL |
| 87 | std::string url; |
| 88 | do |
| 89 | { |
| 90 | std::cout << "Type the complete URL of the webpage to request: "; |
| 91 | std::cin >> url; |
| 92 | } while ((url.find("http://") != 0) && (url.find("https://") != 0)); |
| 93 | |
| 94 | std::cout << "\nRequesting " << url << '\n' << std::endl; |
| 95 | |
| 96 | // Request the URL stopping at a maximum of 16 redirects |
| 97 | requestUrl(url, 16); |
| 98 | |
| 99 | // Wait until the user presses 'enter' key |
| 100 | std::cout << "Press enter to exit..." << std::endl; |
| 101 | std::cin.ignore(10'000, '\n'); |
| 102 | std::cin.ignore(10'000, '\n'); |
| 103 | } |
nothing calls this directly
no test coverage detected