我如何用RABL把XML输出量用在RABL身上? 这使JSON成为违约者,而该违约是罚款。 当我上页时
curl -H “Accept: application/xml” -X GET (myurl)
RABL renders XML as expected. However, when I access the same URL with a browser, the response is in JSON. I tried setting
ActionView:Template:Handlers:Rabl.default_format = Mime:XML
as well as
render “index.rabl”,:content_type => application/xml
In that case, rails returns application/xml as content type but still returns JSON.
我怎么能够把我的XML数据作为唯一接受方,而不发送<代码>申请/xml?