cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to Post data WITHOUT form?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 1 Nov 2007 10:55:19 -0700

On Thu, Nov 01, 2007 at 07:30:18PM +0200, Tigersoft Development Group wrote:
> Hello! I need to post raw data to http://server/page without any
> form/field stuff. Just get data from char *data and send it to server.
> After data is sent - I need to get a raw response as char *response.
> Any suggestions? ;/

If that's true, you don't need curl--you can do it with netcat. But chances
are you don't want to send raw data over a socket, you want to send an HTTP
POST request, or PUT or something similar, with a specific MIME type.
Once you figure out what kind of request you want, then you can figure out
how to do it in libcurl. The chances are high that you'll need the
CURLOPT_POSTFIELDS option, though.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-11-01