You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @dareid,
I am working on chakram framework for API automation. It's a great framework.
I want to retain cookies (or JsessionID) while making multiple calls within APIs.
Here is my piece of code where I am making a post call first and then want to make get call next but I am not able to retain session. Can you please help in identifying what is it that I am doing wrong.
var call = require('chakram');
expect = call.expect;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
Hi @dareid,
I am working on chakram framework for API automation. It's a great framework.
I want to retain cookies (or JsessionID) while making multiple calls within APIs.
Here is my piece of code where I am making a post call first and then want to make get call next but I am not able to retain session. Can you please help in identifying what is it that I am doing wrong.
var call = require('chakram');
expect = call.expect;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
testConfig = require('../config1.json');
login1 = require('../login1.json');
expected = require('./../response.json');
var request = require('request');
describe("User login", function () {
before(function () {
var jar = request.jar();
call.setRequestDefaults({jar: true});
});
it('GETUSERAPI', function () {
return call.get(testConfig.APP_URL+"/rest/user/view").then(function(response, body){
console.log("********");
console.log(response.response.body);
});
});
});
Thanks,
Nidhi
The text was updated successfully, but these errors were encountered: