ChangesFeed Public API used to work in NodeJS 12.x with Old CB server, but it is not working CB Capella.
Those APIs are working fine in Postman.
@Couchbase @CouchbaseTrial Please help!!
ChangesFeed Public API used to work in NodeJS 12.x with Old CB server, but it is not working CB Capella.
Those APIs are working fine in Postman.
@Couchbase @CouchbaseTrial Please help!!
Can you provide any more details about how it’s not working?
It is throwing 403 Forbidden error. Same code working with a lower version of CB.
403 Unauthorized is usually going to be either invalid user credentials, or attempting to access the wrong database name.
Is GET /{db}/ successful as the same user?
GET is working as expected.
PUT is working for string type but not for images like png or jpeg.
We are struck with this, for upgrading to Capella.
TIA
Are you making the requests as GUEST, or as a user?
Can you provide more specifics about which PUT request is working, and which is failing? Sample requests would help identify what is going on here.
Adam,
I’m making requests as a user.
Below request is not working for me. If I add a string to the body, the request is returning a response as success.
var request = require(‘request’);
var options = {
‘method’: ‘PUT’,
‘url’: ‘{{SG_URL}}/{{DB_NAME}}/{{DOC_ID}}/{{FILE_NAME}}?rev={{REV_ID}}’,
‘headers’: {
‘Content-Type’: ‘image/png’,
‘Authorization’: ‘Basic XXXXXXXXXXXX’
},
body: “”
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
ChangesFeed API started working after adding ‘User-Agent’ in Headers list.
Now I’m facing issues with Image Attachment saving. Please let me know if I should close this and create new ticket.
A post was split to a new topic: Empty changes feed response