TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
RESTful API and a Web Site in the Same URL
2 points
by
edmoffo
over 10 years ago
1 comment
anonfunction
over 10 years ago
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>