首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

webmachine的init 跟 to_html

2012-09-28 
webmachine的init 和 to_html请问 群里 有没有 用 webmachine, init 和 to_html 是必须的吗?这个问题 困惑

webmachine的init 和 to_html

请问 群里 有没有 用 webmachine, init 和 to_html 是必须的吗?

这个问题 困惑了 我一会。昨天就应该发现他们的本质,还好只拖到了今天开始

下面 默认提供的to_html方法,当然如果喜欢 可以改成to_htm

init是必须的 初始化用的

。。。。。

?

Handler?is an atom naming the function which can provide a resource representation in that media type. Content negotiation is driven by this return value. For example, if a client request includes an Accept header with a value that does not appear as a first element in any of the return tuples, then a 406 Not Acceptable will be sent.

热点排行