TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
RESTful API and a Web Site in the Same URL
2 点
作者
edmoffo
超过 10 年前
1 comment
anonfunction
超过 10 年前
You could easily do the same by using the HTTP accept header.<p><pre><code> "Accept: application/json" returns the json API "Accept: text/html" returns the website</code></pre>