curl-library
Re: Is there an interface to generate http request?
Date: Mon, 16 Mar 2009 00:32:15 +0100 (CET)
On Sun, 15 Mar 2009, Y.J. wrote:
> But now my project should create and use connection externally. That
> means,my program will create a socket using socket(),then construct http
> request,send it to webserver using send(),then receive http response using
> recv().
Doing a full-fledged HTTP client is slightly more complicated than so.
> I need an interface to construct request and output it to a buffer which can
> be the second parameter of send(). I read the source code of
> curl_easy_perform(),it seems like that there is no such function. Does cURL
> provide such interface?
Nope.
> Or how can I write one based on libcurl?
If you really want to do it "on your own", then you're on your own and libcurl
can't help you. But I would rather suggest that you re-think and instead base
your work on an existing library like libcurl. It'll save you headaches and a
lot of work.
-- / daniel.haxx.seReceived on 2009-03-16