{"action":"created","issue":{"url":"https://api.github.com/repos/quii/mockingjay-server/issues/26","labels_url":"https://api.github.com/repos/quii/mockingjay-server/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/quii/mockingjay-server/issues/26/comments","events_url":"https://api.github.com/repos/quii/mockingjay-server/issues/26/events","html_url":"https://github.com/quii/mockingjay-server/issues/26","id":118750369,"number":26,"title":"Be able to define different response body for different response code","user":{"login":"jzk","id":48630,"avatar_url":"https://avatars.githubusercontent.com/u/48630?v=3","gravatar_id":"","url":"https://api.github.com/users/jzk","html_url":"https://github.com/jzk","followers_url":"https://api.github.com/users/jzk/followers","following_url":"https://api.github.com/users/jzk/following{/other_user}","gists_url":"https://api.github.com/users/jzk/gists{/gist_id}","starred_url":"https://api.github.com/users/jzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzk/subscriptions","organizations_url":"https://api.github.com/users/jzk/orgs","repos_url":"https://api.github.com/users/jzk/repos","events_url":"https://api.github.com/users/jzk/events{/privacy}","received_events_url":"https://api.github.com/users/jzk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-25T03:05:14Z","updated_at":"2015-11-25T15:20:29Z","closed_at":null,"body":"So when it's sending 400 response defined in the monkey-business.yaml instead of normal 200, it would be nice to have server return different response body"},"comment":{"url":"https://api.github.com/repos/quii/mockingjay-server/issues/comments/159638756","html_url":"https://github.com/quii/mockingjay-server/issues/26#issuecomment-159638756","issue_url":"https://api.github.com/repos/quii/mockingjay-server/issues/26","id":159638756,"user":{"login":"quii","id":631756,"avatar_url":"https://avatars.githubusercontent.com/u/631756?v=3","gravatar_id":"","url":"https://api.github.com/users/quii","html_url":"https://github.com/quii","followers_url":"https://api.github.com/users/quii/followers","following_url":"https://api.github.com/users/quii/following{/other_user}","gists_url":"https://api.github.com/users/quii/gists{/gist_id}","starred_url":"https://api.github.com/users/quii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quii/subscriptions","organizations_url":"https://api.github.com/users/quii/orgs","repos_url":"https://api.github.com/users/quii/repos","events_url":"https://api.github.com/users/quii/events{/privacy}","received_events_url":"https://api.github.com/users/quii/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T15:20:29Z","updated_at":"2015-11-25T15:20:29Z","body":"@jzk It seems by chance, this already works\r\n\r\n`monkey.yaml`\r\n````yaml\r\n---\r\n# Writes a different body 50% of the time\r\n- body: \"This is wrong :( \"\r\n  status: 400\r\n  frequency: 0.5\r\n````\r\n\r\n`example.yaml`\r\n````yaml\r\n---\r\n - name: Test endpoint\r\n   request:\r\n     uri: /hello\r\n     method: GET\r\n   response:\r\n     code: 200\r\n     body: '{\"message\": \"hello, world\"}'\r\n     headers:\r\n       content-type: text/json\r\n````\r\nmockingjay-server -config=example.yaml -monkeyConfig=monkey.yaml\r\n\r\nCould you give it a go and let me know if this is what you need?"}}