Return same request body
See original GitHub issueHello, In the response.body I want to return the same request.body For that I use the transformer but it transforms quotes too. Here is an example:
{
"Request": {
"Path": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "/test"
}
]
},
"Methods": [
"post"
]
},
"Response": {
"StatusCode": 300,
"Body": "{{request.body}}",
"UseTransformer": true
}
}
When I test with
{
"key":"value"
}
I get
{
"key":"value"
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
How do I return the request body in a POST request?
1 Answer. It return a python dictionary, if the request passed a json formatted body, otherwise check what you request is sending.
Read more >RESTful API. Should I be returning the object that was ...
It is OK (and most likely desirable) to return something in a POST/PUT response body. How this is done is application-specific and almost ......
Read more >Request Body - FastAPI
A request body is data sent by the client to your API. A response body is the data your API sends to the...
Read more >Spring's RequestBody and ResponseBody Annotations
The @ResponseBody annotation tells a controller that the object returned is automatically serialized into JSON and passed back into the ...
Read more >Mock responses that include request body
I took them directly from Swagger and they are valid responses according to my schema. Now I'm trying to send a POST request...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
1] Use the triple-stash syntax:
{{{request.body}}}
--> https://github.com/rexm/Handlebars.Net/issues/552] Try new preview NuGet:
WireMock.Net.1.0.38-ci-12259.nupkg
PR merged to master.