incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wolfgang haefelinger <whaefelin...@gmail.com>
Subject Re: uuids as xml?
Date Thu, 18 Mar 2010 19:40:34 GMT
Thanks Matteo, thanks Jon,

awk-for-json (JSAWK) looks promising and keeps me (probably) going
beyond _uuid respones. Yes, the sed approach works as well in this
special case.

// Greetz.

On Thu, Mar 18, 2010 at 8:26 PM, Matteo Caprari
<matteo.caprari@gmail.com> wrote:
> It's gross, but you can use sed and bash.
>
> This fetches 100 uuids and cycles trough them.
>
> for v in $(curl localhost:5984/_uuids?count=100 | sed s/'^.*\['// |
> sed s/'].*'// | sed s/'"'//g | sed s/','/' '/g); do echo $v; done
>
> -teo
> On Thu, Mar 18, 2010 at 7:08 PM, wolfgang haefelinger
> <whaefelinger@gmail.com> wrote:
>>>> Which language are you using to talk to CouchDB?
>>
>> I want to use curl for HTTP/REST and /bin/bash for the logic. Ok,
>> looks like that without a JSON layer I'm lost.
>>
>>
>> On Thu, Mar 18, 2010 at 4:07 PM, Jan Lehnardt <jan@apache.org> wrote:
>>>
>>> On 18 Mar 2010, at 08:24, wolfgang haefelinger wrote:
>>>
>>>>> However, CouchDB should probably respond with a "406 Not Acceptable"
>>>>> if it can't provide what was asked for in the various accept headers
>>>>> to make it clear to the client why it failed.
>>>>
>>>> Would be some nice and decent behaviour .. ;-)
>>>>
>>>> However, how do I get this uuids then just using curl and a couple of
>>>> shell commands (except perl, python, ruby, ..)? I don't get it.
>>>
>>> Which language are you using to talk to CouchDB?
>>>
>>> Cheers
>>> Jan
>>> --
>>>
>>>>
>>>>
>>>>
>>>> On Thu, Mar 18, 2010 at 11:44 AM, Matt Goodall <matt.goodall@gmail.com>
wrote:
>>>>> On 18 March 2010 10:20, wolfgang haefelinger <whaefelinger@gmail.com>
wrote:
>>>>>> Well, I thought that couchdb has a REST interface, no?
>>>>>
>>>>> REST doesn't dictate what representations (XML, JSON, etc) are
>>>>> supported. It's perfectly ok for a RESTful interface to only handle
>>>>> JSON.
>>>>>
>>>>> However, CouchDB should probably respond with a "406 Not Acceptable"
>>>>> if it can't provide what was asked for in the various accept headers
>>>>> to make it clear to the client why it failed.
>>>>>
>>>>> - Matt
>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Mar 18, 2010 at 10:57 AM, Sebastian Cohnen
>>>>>> <sebastiancohnen@googlemail.com> wrote:
>>>>>>> hey wolfgang,
>>>>>>>
>>>>>>> the answer is simple: you can't get UUIDs as XML :)
>>>>>>>
>>>>>>> On 18.03.2010, at 10:46, wolfgang haefelinger wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> trying to get a uuid(s) back as XML. Acceptance header does
not work,
>>>>>>>> neither "format":
>>>>>>>>
>>>>>>>> $ curl -H 'Accept:application/xml' http://localhost:5984/_uuids?format=xml
>>>>>>>> {"uuids":["d5158e7420eee5d987fcccde84795847"]}
>>>>>>>>
>>>>>>>> How would I do that?
>>>>>>>>
>>>>>>>> // Wolfgang.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Wolfgang Häfelinger
>>>>>> häfelinger IT - Applied Software Architecture
>>>>>> http://www.haefelinger.it
>>>>>> +31 648 27 61 59
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Wolfgang Häfelinger
>>>> häfelinger IT - Applied Software Architecture
>>>> http://www.haefelinger.it
>>>> +31 648 27 61 59
>>>
>>>
>>
>>
>>
>> --
>> Wolfgang Häfelinger
>> häfelinger IT - Applied Software Architecture
>> http://www.haefelinger.it
>> +31 648 27 61 59
>>
>
>
>
> --
> :Matteo Caprari
> matteo.caprari@gmail.com
>



-- 
Wolfgang Häfelinger
häfelinger IT - Applied Software Architecture
http://www.haefelinger.it
+31 648 27 61 59

Mime
View raw message