Hi Darrell,
sure, you can do the socket & HTTP all on your own, but
the idea of cURL is to take that ground work off your back,
so you can focus on your application.
Cheers
Jan
--
On 7 May 2009, at 03:37, Darrell Huang wrote:
> Do I have to use some libraries like curl to access CouchDB? Can I
> directly use socket to send the HTTP commands in the form of C
> strings? Thanks!
>
> Yours,
> Darrell.
>
>
> CouchDB ships only with JavaScript access libraries. There are
> libraries in many languages, all of them are available through
> independent distribution channels.
>
> I'm not sure if there's a C library, but all access to CouchDB is via
> HTTP, so however you like to access HTTP from C will work. (The
> suggestion to use Curl is a good one). The only other part of the
> story is JSON parsing. In my limited research, yajl looked like a good
> library for that.
>
> I do think you'll end up needing to write most of the library
> yourself. Luckily, once you have the HTTP and JSON libraries linked
> in, the rest is just a matter of giving names to the various URL
> endpoints of the CouchDB API.
>
> Good luck and keep us posted!
>
>>>
>>> What are you talking about? Of course, there's a C API! :-)
>>>
>>> http://curl.haxx.se/libcurl/
>>>
>>> cheers,
>>> hugs
>>>
>>
>>
>
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
>
>
|