incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: Automatic Unix Timestamp
Date Fri, 26 Jul 2013 17:30:59 GMT
Just post to URL that points to your update handler:

curl -X POST http://example.com/foobar/_design/baz/_update/boo -d
'{"_id":"123456"," unixtimestamp":null,"user":"joe","fruit":"peach"}'
-H "Content-Type: application/json"
--
,,,^..^,,,


On Fri, Jul 26, 2013 at 9:28 PM, Hank Knight <hknight555@gmail.com> wrote:
> Because I need revisions to have updated timestamps, an update handler
> is what I need.
>
> But even after searching the net and reading documentation, I still
> have no clue as to how to create and use an update handler from a
> command line using curl.
>
> I use this to add a document:
>
> curl -X POST http://example.com/foobar -d
> '{"_id":"123456","unixtimestamp":null,"user":"joe","fruit":"peach"}'
> -H "Content-Type: application/json"
>
> Using only curl, how can I create and reference an update handler?

Mime
View raw message