Fetch API abstraction next 13
Unanswered
Western yellowjacket posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Western yellowjacketOP
I want to create an abstraction for fetch API in next 13. So I created an AuthService (outside the next 13 project, in a share folder, this is a turborepo monorepo) and I'm calling it inside page.tsx
The problem is that
The problem is that
{ cookies } from 'next/headers'
is giving an error, because it assumes its parent its a client component.![Image](https://cdn.discordapp.com/attachments/1131642743358230629/1131642743974789190/Screenshot_2023-07-20_at_17.43.05.png)
![Image](https://cdn.discordapp.com/attachments/1131642743358230629/1131642744209682502/Screenshot_2023-07-20_at_17.43.20.png)