I believe you need to convert the cookies to the format that BAS understands, and then import them into BAS using a standard method.
Take a look:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Cookie
@gudolik said in How to set cookies to POST ?:
I need to set custom cookie on post in order to pass perimeterx security, how to do it?
BAS has its own cookie format and only works with it.
@UserTrue so that will work ?
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
@UserTrue said in How to set cookies to POST ?:
@gudolik No, you should look at what the cookies format looks like in BAS (JSON) and do the same.
so there no simple way to set cookies? I need to create json in BAS cookie format which is really hard to do with dynamic data...
@UserTrue said in How to set cookies to POST ?:
@gudolik No, you should look at what the cookies format looks like in BAS (JSON) and do the same.
I did tried in BAS (JSON) format but in this way deletes other cookies which is not an option. Please someone help with that question :)