theflamingskunk
theflamingskunk5mo ago

Get HTTP timings with deno fetch api

Hello! I was wondering if it is possible to get http timings for a given fetch request. (Something along the lines of PerformanceResourceTiming api)
1 Reply
xGary
xGary5mo ago
I tried with Performance api along with fetch request, It is working sort of on browser but not on server my test looks like this:
const url = "https://dummyjson.com/test"
const res = await fetch(url)
const [entry] = performance.getEntriesByName(url);
const url = "https://dummyjson.com/test"
const res = await fetch(url)
const [entry] = performance.getEntriesByName(url);

Did you find this page helpful?