I saved a png locally in my test/resources, but can't get it to return as a Payload. It looks like src/test/resources/testImage.png. I'm trying to figure out how to return that in the payload of the "Mock When" call. I've tried read readUrl, but it can't accept "image/png" as a data type.
1 réponse
@Benjamin Stone You would have to first encode your file in base64 format then store it in src/test/resources folder as base64 encoded String. Then you set that string as a payload or a field of payload along with the content-type of application/octect-stream. You may want to send file name field as well in the response which could have value like "abc.png"