How to edit url with Fiddler (script)?

I want to change url using fiddler. Not necessary to be with a fiddler script, but there is an approximation of how I am doing it now:

if (oSession.url.contains("example.com") {
  String oldUrl = oSession.url.ToString();
  Regex rgx = new Regex("1.2");
  String newUrl = rgx.Replace(oldUrl, "1.0");
}

      

This code is giving me a compiler error on the regex generation line: "The attribute list does not apply to the current context." I'm not really sure what that means.

I am also not sure how exactly to change the url.

Any ideas?

+3


source to share


2 answers


Just received:



oSession.url = oSession.url.Replace("1.2","1.0");

      

+4


source


You can also use



    oSession.PathAndQuery = oSession.PathAndQuery.replace('/test1/', '/changed1/');  

      

0


source







All Articles