Ask a Question

How to post both image and json file in a REST request ?

Occasional Visitor

How to post both image and json file in a REST request ?

I am not able to post both JSON and IMAGE file in one request, I set media type as Multipart/form-data and checked Post QueryString. But by default, it makes content-type of JSON file as text/javascript. And so the response is "Content type text/javascript is not supported". Please help


I am able to get Success response from POSTMAN. but not working here in SOAP UI Pro

Community Hero

You mean to say that you need a dynamic request, media type and attachment?

For setting dynamic request -

For setting dynamic attachment -
There is a thread I was searching for this, could not find.

You can use test case level custom properties and use Property expansion for the directory and filename in the attachment part.

Similarly, use custom property for Content-type and use property expansion for the same.


Refer here to know more about Property Expansion

Showing results for 
Search instead for 
Did you mean: