Skip to content

Commit bb38816

Browse files
authored
Update README.md
1 parent 22b2d02 commit bb38816

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,11 @@ int main(int argc, const char **argv) {
110110
error.print_traceback();
111111
// Note that the printing the stack will erase it
112112
}
113+
113114
// 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;
121118
return 0;
122119
}
123120
`````

0 commit comments

Comments
 (0)