Could someone please tell me how to GET a particular document using the sync gateway REST APIs? I tried GET “localhost:4984/{dbname}/{doc_id}” for which I get a reply
{"error":"Forbidden","reason":"forbidden"}
when I tried GET on "localhost:4985/{dbname}/{doc_id} I get a response
[Fiddler] The connection to 'localhost' failed. <br />Error: ConnectionRefused (0x274d). <br />System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it localhost:4985
What am I doing wrong?
EDIT: Ok so I realised why the call to port 4985 doesn’t work. Sync gateway’s admin rest api’s are behind a firewall and only work from localhost. But why doesn’t the call to 4984 work?