TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RESTful API and a Web Site in the Same URL

2 pointsby edmoffoover 10 years ago

1 comment

anonfunctionover 10 years ago
You could easily do the same by using the HTTP accept header.<p><pre><code> &quot;Accept: application&#x2F;json&quot; returns the json API &quot;Accept: text&#x2F;html&quot; returns the website</code></pre>