Read contents of a local text file into a variable

0 Answers 423 Views
Fiddler Classic
Alex
Top achievements
Rank 1
Iron
Iron
Alex asked on 17 Jan 2022, 07:08 PM
I'm a Fiddler Classic user and I would like to know if it's possible to read a local text file into a variable.

I will use this variable (say, 'file_contents') to replace a string in a web page with the contents of the local file. The replacement code looks like this:
var oRegEx = /string_to_replace/;
oBody = oBody.replace(oRegEx, file_contents);
How can I do that, please?

Thank you,

Alexander
Nick Iliev
Telerik team
commented on 20 Jan 2022, 07:34 AM

It is possible to write to a file (see this thread), so you should do the same in the other direction. A potential setback would be that the read operation could delay the whole execution of the request.

No answers yet. Maybe you can help?

Tags
Fiddler Classic
Asked by
Alex
Top achievements
Rank 1
Iron
Iron
Share this question
or