This message was deleted.
# general
s
This message was deleted.
l
Hi, could you use the
jsonBody
element which allows you to specify the body as json? https://wiremock.org/docs/stubbing/#specifying-the-response-body
v
Hi @Lee Turner Thanks a lot. How to specify XML response body in the json file? There are some legacy applications in my company still uses xml 🙂
l
I think you have two options. Use the body element and wrap your xml in a string or use the bodyFileName element where you can reference a separate file for the body contents. The file you reference can be any file type so you can reference an xml file directly
You could do the same with a json file if you wanted to instead of using the jsonBody element I mentioned in my first reply.