[英]Where do I put $this->request->headers('Content-Type', 'application/json');
[英]Kohana 3.2 request->headers['Content-Type'] keeps failing
由于某些原因,这在Kohana 3.2中不起作用:
$this->request->headers['Content-Type'] = 'text/xml';
自Kohana 3.1以来有没有改变?
它也不应该在3.1中工作,但这应该:
$this->request->headers('Content-Type', 'text/xml');
请参阅http://kohanaframework.org/3.2/guide/api/Request#headers这是3.1中的请求/响应重构更改之一。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.