File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,11 @@ int main(int argc, const char **argv) {
110
110
error.print_traceback();
111
111
// Note that the printing the stack will erase it
112
112
}
113
+
113
114
// Retrieve information about curl current session.
114
- auto x = easy.get_info<char>(CURLINFO_CONTENT_TYPE);
115
- /**
116
- * get_info returns a curl_easy_info object. With the get method we retrieve
117
- * the std::pair object associated with it: the first item is the return code of the
118
- * request. The second is the element requested by the specified libcurl macro.
119
- */
120
- std::cout<<x.get().second<<std::endl;
115
+ auto x = easy.get_info<CURL_CONTENT_TYPE>();
116
+ // Print out content type
117
+ std::cout << x.get() << std::endl;
121
118
return 0;
122
119
}
123
120
`````
You can’t perform that action at this time.
0 commit comments