Kris
Kris

Reputation: 342

Postman GET Response binary

I am setting up a mock server and would like to have a GET Response containing an image file, I cannot find any information on how to set this up.

The response section of Postman only has - Pretty/Raw/Preview options and no - from-data/binary?

Any hints appreciated!

Upvotes: 4

Views: 9559

Answers (1)

Danny Dainton
Danny Dainton

Reputation: 25921

You should be able to add the image to a Mock Server example with an <img> tag and add the text/html Content-Type header.

You can either reference the URL or base64 encode the image and use the value within the tag. The base64 value of the image is going to be massive though.

Mock Image

Upvotes: 4

Related Questions