I want to get an image from http://lorempixel.com
using the $randomImage
variable in Postman and use this in another multipart request which accepts a image/png
content-type. How can I do that? I think I need to store the image in a variable but I don't know how to do that. I am open to using collections or using pre-request script.
Asked
Active
Viewed 359 times
0

user828647
- 505
- 1
- 10
- 27
1 Answers
0
You can store the value of $randomImage
into an environment variable: pm.environment.set("myImage", $randomImage));
And then later access it via pm.environment.get("myImage");

Christian Baumann
- 3,188
- 3
- 20
- 37