On Thu, 4 Apr 2024, R C via curl-library wrote:

I can read the HTTP status with CURLINFO_RESPONSE_CODE,  can the actual status/error message also be printed? (are the messages available in libcurl?

There is no way to get the so called "reason-phrase" using the API, no. You can extract it yourself using the header callback if you truly want to.

RFC 9112 says this:

A client SHOULD ignore the reason-phrase content because it is not a reliable channel for information

HTTP/2 and HTTP/3 dropped the reason phrase completely from the protocol for that reason.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to