cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTPpost and response from server

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 21 Jan 2006 13:45:11 +0100 (CET)

On Sat, 21 Jan 2006, Jacek Jablonski wrote:

> I want to post something to server, but than I have to read a response, not
> all webpage but only response. For example, when I send SMS through the sms
> gateway, the server sends me a response if it was successful or that I don't
> have credits. How can I read this response or save it to some structure?

Just like you get any kind of response with libcurl: set a write callback and
get it called with the response data. If you want the headers too, you either
set a specific callback for that, or ask libcurl to provide the headers to the
regular data callback.

I don't quite understand what you mean with "not all webpage but only
response". What's the difference between a response and a "webpage" according
to you?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-21