MCPcopy Create free account
hub / github.com/SFML/SFML / main

Function main

examples/http/Http.cpp:84–103  ·  view source on GitHub ↗

/////////////////////////////////////////////////////// Entry point of application \return Application exit code ///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

82///
83////////////////////////////////////////////////////////////
84int 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}

Callers

nothing calls this directly

Calls 2

requestUrlFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected