cancel
Showing results for 
Search instead for 
Did you mean: 

Return fixed JPEG in REST MockService

DG
Occasional Contributor

Return fixed JPEG in REST MockService

Hi.

 

I am attempting to mock an RESTful API that we use to download images from a URL.

 

The API of the RESTful service documentation says:  You receive a JPG or PNG image in case of success with the according header (e.g. ContentType: image/jpeg).

 

How can I setup a mockservice response to do this?  I do not need the image in my reponse to be dynamic.  I just need a valid JPG to be returned when the mocked URL receives a GET request.

 

Thanks

Dave

3 REPLIES 3
Contributor

Re: Return fixed JPEG in REST MockService

hi

 

did you get any answer for this? I am looking for an answer too.

DG
Occasional Contributor

Re: Return fixed JPEG in REST MockService

Nah, never got an answer.

Will come back to it at some point.  Will update if I ever work it out!

New Contributor

Re: Return fixed JPEG in REST MockService

I have tried other some similar files or other type of files (PDF or binary) but any of them don't works. All of them give a "corrupt" file. In fact I tested in SoapUI 5.5

 

I debugged and I guess that SoapUI return always the file as a Base64 string, whether imported as Base64 is or not in the editor.

 

I think that is a serious bug, but I don't know how report it.

 


@DG wrote:

Nah, never got an answer.

Will come back to it at some point.  Will update if I ever work it out!


 

New Here?
Join us and watch the welcome video:
Top Kudoed Authors