Thin HTTP client pattern for Node.js / TypeScript.
v1
const response = await fetch( "http://127.0.0.1:3000/v1/users/dylan/streams/<uuid>/retrieve", { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json", }, body: JSON.stringify({ query: "What does Dylan prefer?", limit: 5, }), }, ); console.log(await response.json());