curlcpp icon indicating copy to clipboard operation
curlcpp copied to clipboard

easy.get_info<CURLINFO_CONTENT_TYPE>(); not a std::pair

Open aboelens opened this issue 1 year ago • 0 comments

In one of the examples it is mentioned that:

/**

  • get_info returns a curl_easy_info object. With the get method we retrieve
  • the std::pair object associated with it: the first item is the return code of the
  • request. The second is the element requested by the specified libcurl macro. */

However, the type of I get is:

auto x = easy_.get_info<CURLINFO_CONTENT_TYPE>(); std::cout << "Type of x: " << typeid(x.get()).name() << std::endl;

Type of x: class std::basic_string<char,struct std::char_traits,class std::allocator >

instead of a std::pair. How do I get just the element requested?

Thanks,

Arnout

aboelens avatar Oct 01 '24 11:10 aboelens