hey, can someone tell me what is the best practice...
# help
a
hey, can someone tell me what is the best practice when it comes to sending a post request i know i can call a function and send data directly to supabase from the client but is it better to sent it through an endpoint? im using svelte
n
Hello @Ape R Us! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
k
It depends on what you want to achieve, both are acceptable, but sending requests from endpoints is more idiomatic if you're making updates to DOM etc. based on sessions. In particular, it allows you to SSR and serve HTML with filled in data rather than waiting on the client with a blank screen. It also subjectively for me feels cleaner separating fetching/model logic from other ui/business logic.
n
Ape R Us (2022-05-14)