Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShivaBhattacharjee/KeyZen
/ 01_fetch_api.js
File
01_fetch_api.js
data/javascript/01_fetch_api.js:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
async
function
fetchUser(id) {
2
const
res =
await
fetch(`/api/users/${id}`);
3
if
(!res.ok) {
4
throw
new
Error(`HTTP ${res.status}`);
Callers
nothing calls this directly
Calls
1
main
Function · 0.70
Tested by
no test coverage detected