【发布时间】:2012-05-30 09:03:50
【问题描述】:
有没有明确的"text/json" 指定的简写方法?
def remoteError = {
render( status: 500, contentType: "text/json"){
error( exception: "a remote exception occurred")
}
}
我尝试使用as JSON...没有返回内容但状态码正确...
render( status: 500, exception: params.exception) as JSON
【问题讨论】: