mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
How to access the request's body params comming from PostMan body ? #512
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pouyaSobhanipour on GitHub (May 16, 2023).
Hello .
The complete question is :
How to access the request's body params comming from PostMan? and put them inside the responce using templates
{{ }} ?
The request body should be this :
the response should be as :
{ result = "OK", description = "Request accepted", requestCode = "{{ request.bodyAsJson.requestCode}}" }which thi case should be
{ result = "OK", description = "Request accepted", requestCode = "ABC" }@StefH commented on GitHub (May 16, 2023):
Your code should work:
{ result = "OK", description = "Request accepted", requestCode = "{{ request.bodyAsJson.requestCode}}" }For more info see: