Hello Everyone I have a simple template: ```{ ...
# help
v
Hello Everyone I have a simple template:
Copy code
{
  "priority": 10,
  "request": {
    "method": "POST",
    "urlPattern": "(.*)/test"
  },
  "response": {
    "transformers": [
      "response-template"
    ],
    "status": 200,
    "headers": {
      "Content-Type": "application/json"
    },
    "body": "{\"value\": \"{{jsonPath request.body '$.value'}}\"}"
  }
}
When I'm performing the request with body like this:
Copy code
{
  "value": "some\\data"
}
In response I'm receiving value "some\data" (without one backslash). Is it possible to keep both backslashes is the response?
w
I'm not sure if it will help with your issue, but I think you can replace :
"body": "{\"value\": \"{{jsonPath request.body '$.value'}}\"}"
with:
"jsonBody": {"value": "{{jsonPath request.body '$.value'}}"}
at least it will improve redability (no need to escape the double quotes)
v
Thanks, thats really good tip for readability, but it didn’t help with the problem