Next 13 API responses just froze after build
This logic is supposed to return the current date when the end point is requested, it works fine on dev mode, but this endpoint response is frozen/cached after i run build, can someone clarify what is happening? I'm even doing the best i can on headers response and in client to turn this page like a getServerSideProps page
![](https://utfs.io/f/995a3cb6-3c36-4783-8605-85ce15036231-ai104r.png)
![](https://utfs.io/f/1bc29be1-e471-462a-8e7a-4d2d756d6601-2uux0c.png)
5 Replies
It might be because you donβt actually use
request
at all, not entirely sure thothat's right, but i'm not sure how i'm supposed to use the request on that endpoint logic, there is nothing dynamic
https://beta.nextjs.org/docs/routing/route-handlers#dynamic-route-handlers
Routing: Route Handlers | Next.js
Route Handlers are a new way to create custom request handlers for a given route. All HTTP methods are supported, including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.
![](https://utfs.io/f/a427777c-d97c-4efb-b76b-5aae2d98296b-ebe08n.png)
could you send back a piece of data from the request maybe?
or i wonder if doing
request.something;
inside the function is enough to make next think it's dynamicline 47 was all i need mate, we tricked him
thanks dude π§βπ
![](https://utfs.io/f/7d3afb75-cae5-47dc-9ddf-2786b0e77b31-g0by.png)
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View