Hi,I want to know that why I need add username/password and headers with cookies info both in remote to sync doc ? I think headers with Cookies is enough(Cookies info indicated username and password), why I need to add username and password in remote object?
On Thursday, November 21, 2013 at 11:27:00 PM UTC+8, Jens Alfke wrote: > > > On Nov 21, 2013, at 6:45 AM, pierre houlle <[email protected] > <javascript:>> wrote: > > > > {"session_id":"5b6d5f1a5f9a655eb346a08c308b0a44dfaab7a7","expires":"2013-11-21T14:41:55.178257443Z","cookie_name":"SyncGatewaySession"} > > > > > > Now I would like to know, if it's possible, how to send this cookie via > my JS var remote or another var/property > > You’d add a property called “headers” to your ‘remote’ object. This lets > you add extra HTTP headers to the requests the replicator sends. Add a > Cookie header that will send the cookie whose name and value were > specified: > > var remote = { > url : 'http://user:[email protected]:4984/db', > headers: {Cookie: > “SyncGatewaySession=5b6d5f1a5f9a655eb346a08c308b0a44dfaab7a7”} > }, > > There’s a bit of documentation at > http://wiki.apache.org/couchdb/Replication#Authentication > > —Jens -- 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/32a11296-c331-41e1-984f-d4eb06966afd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
