标题类型更改为application / json不变

从“text / html”到“application / json”的响应的标题类型。 除此之外

我使用头部类型作为标题(“Content-Type”,“application / json; charset = UTF-8”)

但不能改变。

Status Code: 200 OK
Connection: keep-alive
Content-Type: text/html
Date: Wed, 19 Nov 2014 05:49:55 GMT
Server: Apache mod_fcgid/2.3.10-dev
Vary: User-Agent
Via: 1.1 (external)pdc.amw.lan (squid/3.3.8), 1.1 (frontal)pdc.amw.lan (squid/3.3.8)
X-Cache: MISS from (external)pdc.amw.lan, MISS from (frontal)pdc.amw.lan
X-Cache-Lookup: MISS from (external)pdc.amw.lan:3130, MISS from (frontal)pdc.amw.lan:0
X-Powered-By: PHP/5.4.34

设置标题如下,不像header("Content-Type", "application/json;charset=UTF-8")

header("Content-Type: application/json");
链接地址: http://www.djcxy.com/p/48181.html

上一篇: Header Type change to application/json not changing

下一篇: Spring @RestController not returning plain text response