pass JSON values from request to response
ZAJDAN opened this issue · 1 comments
ZAJDAN commented
Hello,
this is my first work with any mock server.
I am sending from client(via method POST) to duckrails json data.
Is possible pass the values from the clients request into response a return them back to the client?
Thank You
iridakos commented
Hi @ZAJDAN
Yes, you can access the body of the request via @request.body.read
.
To return it as is, use the following inside the Body content field of the mock form (make sure that the response body type is set to "Embedded Ruby"):
<%= @request.body.read %>
Feel free to re-open this issue in case I didn't answer your question.
Bye