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
It's possible to share states from the onRequest() and the onResponse() from different scripts when the script is executed with the global object: sharedState
Get the global counter and increase it as soon as the script is executed
Share data between Request and Response
functiononRequest(context,url,request){// Save some state to sharedStatesharedState.url=url;sharedState.data="custom";sharedState.info={"username": "Proxyman"};// Increase the global countervarcount=sharedState.count??0;count+=1;sharedState.count=count;// Logconsole.log(sharedState);returnrequest;}functiononResponse(context,url,request,response){// Receive itconsole.log("Custom data = "+sharedState.dataa);console.log("sharedState.count = "+sharedState.count);// Donereturnresponse;}
The text was updated successfully, but these errors were encountered:
Description
Acceptance Criteria
The text was updated successfully, but these errors were encountered: