curl / Mailing Lists / curl-library / Single Mail


Re: HTTP2 push notifications - APNs JSON response

From: Daniel Stenberg <>
Date: Thu, 8 Dec 2016 23:51:22 +0100 (CET)

On Thu, 8 Dec 2016, Miloš Ljumović wrote:

> I learned that when response code is other than 200 (success) APN sends
> additional JSON information about error:

> I couldn't find a way to retrieve above JSON information.

The JSON part is in the HTTP response body, and you get that from libcurl the
same way totally independent of the HTTP response code. So just provide a
write function callback and receive the data.

The getinmemory.c example shows one way to do it if you want to receive the
entire response into a dynamic memory area.


List admin:
Received on 2016-12-08