curl-library
Re: FW: getting CURL parse the body
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 26 Oct 2013 14:32:40 +0200 (CEST)
Date: Sat, 26 Oct 2013 14:32:40 +0200 (CEST)
On Fri, 25 Oct 2013, Sivasamy, Kalidoss wrote:
> Will this work to get separate call backs for Header and Body?
>
> curl_easy_setopt(m_pCurl, CURLOPT_HTTPHEADER, headers);
> curl_easy_setopt(m_pCurl, CURLOPT_URL, a_requestURL.c_str());
> curl_easy_setopt(m_pCurl, CURLOPT_HEADER, 1);
> curl_easy_setopt(m_pCurl, CURLOPT_WRITEFUNCTION, WSCommunication::BodyCallback);
> curl_easy_setopt(m_pCurl, CURLOPT_WRITEDATA, (void *)&st_Chunk_Body);
> curl_easy_setopt(m_pCurl, CURLOPT_HEADERFUNCTION, WSCommunication::HeaderCallback);
> curl_easy_setopt(m_pCurl, CURLOPT_HEADERDATA, (void *)&st_Chunk_Header);
Yes, but since you set CURLOPT_HEADER you will also get all headers to the
body callback.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-10-26