I'm using karate.callSingle for calling Authorization. It gets expired after 2 hours. Can we configure callSingle to call after 2 hours?

31 Views Asked by At

If I can regenerate Authorization again after some time (say 2hours), I can use it. Else I need to add a scheduler to call Authorization after 2 hours.

This is the below code that I have used to call Authorization in karate-config.js and I have used this throughout the project.

var websecAPI = karate.callSingle('classpath:service/Regression/RestClient.feature@restclient',config);
config.Authorization = websecAPI.Authorization;
0

There are 0 best solutions below