Check this example for `/_replicate` endpoint with the custom header <http://developer.couchbase.com/documentation/mobile/1.1.0/develop/references/couchbase-lite/rest-api/server/post-replicate/index.html#example>. I think headers takes an object and not a string. Also, how are you testing this endpoint? Are you running a PhoneGap app or using curl/httpie to send the request to the CBLite server?
James On Tuesday, 1 September 2015 16:29:46 UTC+1, Jakub Kowalski wrote: > > Hey, > > My problem is similar to this: > https://github.com/couchbase/couchbase-lite-ios/issues/565 but this issue > is closed and maybe I'm doing something wrong. > I want to handle custom session expiration, but when Sync Gateway returns > 401, I'm getting "Processed 0/0" task status. > > Everything is based on Phonegap TodoLite example, with difference that I'm > using custom session cookie instead of facebook token, so my sync > definition looks similar to this: > > source : { > "url": "http://address:4984/my_db", > "headers" : "SyncGatewaySession=a8s7df69a87s6d9f7a98s766df97a6s" > }, > target : "my_db", > continuous : true > > > I've tried also with original TodoLite example, connecting it to my sync > gateway and removing session cookie from database. Result is the same. 401 > from sync gateway, auth-challenge handler is not called. > > -- 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/1b76da75-5623-4520-8d79-3ea039516044%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
