1 New thread group---->New HTTP request----->
2
3 Create a new Beanshell Sampler under the thread group
write
import java.io. *;
byte[] result = prev.getResponseData(); //This is to get the data returned by the request, prev is to get the return of the previous request
String file_name = "C:\\Users\\Administrator\\Desktop\\jmx\\meinv2.jpg"; //represents the location and file name of the file
File file = new File(file_name);
FileOutputStream out = new FileOutputStream(file);
out.write(result);
out.close();