[]previous and next page

Send a request

After npm run dev, call the running endpoint with the browser's fetch.

For agentsUpdated

After npm run dev, call the running endpoint with the browser's fetch. A successful response contains the value returned by the route.

request.tsts
const response = await fetch("/api/posts");
console.log(response.status);
console.log(await response.json());
Outputtext
200
{ posts: [{ id: "1", title: "First post" }, { id: "2", title: "Second post" }] }