Reading file using HTTP Request is suggested for Passing variables between threads.
For example you could use the Save Responses to a file listener or perhaps a BeanShell PostProcessor in one thread, and read the file using the HTTP Sampler "file:" protocol, and extract the information using a PostProcessor
Which is working, but should the warning in doc be ignored?
Note: the FILE protocol is intended for testing purposes only. It is handled by the same code regardless of which HTTP Sampler is used.
Is/when it safe/good practice to use file protocol or is it deprecated/bad practice?
Assuming all above:
although there is nothing wrong with using file
protocol if you need to read the data from a file on the file system, it's better to avoid these interim files and pass the data between threads using memory, the options are in: