【发布时间】:2019-09-19 05:59:21
【问题描述】:
我正在尝试将 json 数据作为 grails 中的响应正文发送。我尝试使用以下方法将 Content-Type 标头设置为 application/json:
render (status: httpServletResponse, text: responseToRender as JSON, contentType: "application/json")
每次生成的header如下:
Content-Type: application/json;charset=utf-8
如何去掉 charset=UTF-8 后缀?
【问题讨论】:
标签: grails