Cannot extract keys when Content-type header is not set
When Content-type header is not set, mmock cannot extract keys.
Example log:
{ "scheme": "http", "host": "1", "port": "80", "method": "POST", "path": "/jsonrpc/v1/payments.create", "queryStringParameters": {}, "fragment": "", "headers": { "Accept-Encoding": [ "gzip" ], "Authorization": [ "Basic cWE6cWE=" ], "Cache-Control": [ "no-cache" ], "Content-Length": [ "33" ], "Cookies": [ "{}" ], "User-Agent": [ "Go-http-client/1.1" ] }, "cookies": {}, "body": "{\"id\":\"e2a69502\",\"jsonrpc\":\"2.0\"}" }
Mapping:
{"id": "{{request.body.id}}", "jsonrpc": "{{request.body.jsonrpc}}"}
What mmock returns:
{"id": "{{request.body.id}}", "jsonrpc": "{{request.body.jsonrpc}}"}
P.S. Sorry, i got it wrong for the first time, because of escaped JSON in log
Maybe create additional parameter to set default content, based on matched mapping?