curl-library
Re: HTTP2 push notifications - APNs JSON response
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.
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-12-08