Added ability to set JSON response status code.