我在设置外部Kohana3.1+请求的内容类型标头时遇到困难。
$r = Request::factory($this->api)
->method(Request::PUT)
->body($this->to_json())
->headers('content-type', 'application/json');请求最终由curl执行。请求类型(PUT)和请求主体( json)的CURLOPT_设置正确,但没有设置内容类型。
我是不是走错了路?
发布于 2011-03-11 16:37:10
这是个窃听器。问题在这里得到了回答:
http://forum.kohanaframework.org/discussion/8378/set-content-type-for-external-put-requests
你可以在这里选择一个修复:
http://dev.kohanaframework.org/issues/3830
https://stackoverflow.com/questions/5252996
复制相似问题