MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / main

Function main

test/easy.cpp:10–25  ·  view source on GitHub ↗

* This example shows how to make a simple request with curl. */

Source from the content-addressed store, hash-verified

8 * This example shows how to make a simple request with curl.
9 */
10int main() {
11 // Easy object to handle the connection.
12 curl_easy easy;
13
14 // Add some options.
15 easy.add<CURLOPT_URL>("http://www.google.it");
16 easy.add<CURLOPT_FOLLOWLOCATION>(1L);
17
18 try {
19 easy.perform();
20 } catch (curl_easy_exception &error) {
21 // If you want to print the last error.
22 std::cerr<<error.what()<<std::endl;
23 }
24 return 0;
25}

Callers

nothing calls this directly

Calls 1

performMethod · 0.45

Tested by

no test coverage detected