Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use astro-sidecar to mock API requests that are made from the server rendering part? #1

Open
cauboy opened this issue Aug 2, 2024 · 0 comments

Comments

@cauboy
Copy link

cauboy commented Aug 2, 2024

Hi,

thanks for publishing astro-sidebar!

I'd like to use astro-sidebar not to mock client side requests but requests that happen when pages are server-rendered. Is that possible with astro-sidebar?

E.g.

// pages/index.astro
---
const data = await fetch(url).then(res => res.json())
---
<html>
…
<code>{JSON.stringify(data)}</code>
…
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant