cURL / Mailing Lists / curl-library / Single Mail


Re: Is it possible to get the response message associated with CURLINFO_RESPONSE_CODE?

From: Daniel Stenberg <>
Date: Tue, 15 Oct 2013 21:24:08 +0200 (CEST)

On Tue, 15 Oct 2013, Sachin Nikumbh wrote:

> I am trying to use the curl to communicate with our proprietary server. For
> all the non 200 messages, our server sends a message which is very useful
> for the client. I can get to the response code using CURLINFO_RESPONSE_CODE
> but I haven't found any way to get to the message associated with this
> response code.

There's no CURLINFO_* variable for that information. Usually that message is
pointless or inaccurate...

The current way to extract that information is to set a header callback and
then parse the first header line you get in that callback, as that is the
first response line.

List admin:
Received on 2013-10-15