Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
v45 was merged from the PR "Add tracing to fetchJSON calls" by maxm
Comments
2
pomdtr avatar

It would be nice to improve the types of the function:

export const fetchJSON = async (url: string, options?: RequestInit) => {}

stevekrouse avatar

Thanks for the idea @pomdtr! I gave it a go, and included the new custom bearer options param I added -- what do you think?

July 2, 2024