Configuration request and response from JSON file
patsevanton opened this issue · comments
Anton Patsev commented
Hello.
Can support import request and response from JSON file configuration?
For example:
{
"request": {
"method": "GET",
"url": "/test"
},
"response": {
"status": 200,
"body": "test 200 OK\n"
}
}
Examples run
curl http://localhost/test
test 200 OK
Tom commented
Not natively, but you can easily parse a JSON input and map its definitions into proper gock
instances. As this feature is not a native responsibility of gock
, there are no plans to support it.