Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aboelens opened this issue Oct 1, 2024 · 0 comments
Open

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

aboelens opened this issue Oct 1, 2024 · 0 comments

Comments

@aboelens
Copy link

aboelens commented Oct 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant