download file

1 New thread group---->New HTTP request----->

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();

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325382051&siteId=291194637