Hi everyone ! Can please somebody help me with a fiddler - script , to compile me a fiddler script from zero to replace 2 Json values on a website before-request ! i tryed with this :
static function OnBeforeRequest(oSession: Session)
if(oSession.HostnameIs("mywebsite") && oSession.HTTPMethodIs("POST") && oSession.uriContains("/some.web/data/Entry/Validate"))
{
oSession.utilDecodeResponse();
var body = oSession.GetResponseBodyAsString();
try {
var dataJson = Fiddler.WebFormats.JSON.JsonDecode(body).JSONObject;
var Co = (null); // HERE I MUST REPLACE WITH (null)
var Cap = MY-VALUE-HERE-LETTERS-AND-NUMBERS; //EXAMPLE: FATH45786544565342U7
dataJson["Dispo"]["{}"]["Ben"]["Co"] = Co;
dataJson["Dispo"]["{}"]["Ben"]["Cap"] = Cap;
}
catch(e) {
FiddlerObject.log(e);
}
body = Fiddler.WebFormats.JSON.JsonEncode(dataJson);
}
///// i want to place the code in fiddler-script JS //// please help me with a solution ! i am also ready to pay in btc for who want to help me ! thank you in advice !