Hello,

I am trying to implement webhooks to call REST service API on document 
change event.
When document is changed I get following WARNING in Sync gateway console 
and REST service specified is not getting called.

2016-03-31T13:06:46.320-05:00 WARNING: changeCache: Error unmarshaling doc 
"21st
_amendment_brewery_cafe": <nil> -- db.(*changeCache).DocChanged.func1() at 
chang
e_cache.go:327

Is there any specific way I need to write REST call method in Java ?
Let me know what is missing or wrong here.
I would Appreciate quick help.


Here is my sync gateway config file :

{
"interface": ":4984",
"adminInterface": ":4985",
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", 
"Shadow+", "Changes", "Changes+"],
"databases": { 
"sync_gateway": {
"server": "http://localhost:8091";,
"bucket": "beer-sample",
"verbose": "false",
"sync":`function(doc) {channel(doc.channels);}`,
"users": {
"GUEST": {
"disabled": false,
"admin_channels": ["*"]
}
}, 
  "event_handlers": {
  "document_changed": [
    {
   "handler": "webhook",
   "url": "http://localhost:8080/demo/notify";,
   "filter": `function(doc) {
    if (doc.type == 'brewary') {
     return true;
    }
    return false;
   }`
    }
  ]
   }
}
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/35cfb835-b01c-44b0-b149-7e9d22d739ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to