iridakos / duckrails

Development tool to mock API endpoints quickly and easily (docker image available)
https://github.com/iridakos/duckrails/wiki
MIT License
1.72k stars 108 forks source link

Overwrite status code return #59

Closed renatovieiradesouza closed 4 years ago

renatovieiradesouza commented 4 years ago

How to change status code in return? I have 3 mock and need only one, more with status code different.

Im Try:

var ob = {"status_code": 500}; JSON.stringify(ob);

In Ruby ok:

<%= {status_code: 500}.to_json %>

renatovieiradesouza commented 4 years ago

Solved question:

var status_code = 500; return JSON.stringify(status_code);