How to use fetching data on server side (models or database queries) ? #19
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, thank you for your question! Are you using Viewi with some framework or as a standalone app? To get the data you need to create an API endpoint, which will return your data. Then you need to use HttpClient to get that data. Does this answer your question? Please ping me if needed, I would love to help. |
Beta Was this translation helpful? Give feedback.
-
it work only with HttpClient ? can i inject my own HttpClient or other service which provide some data? can i inject different implementations of this service on backend and frontend? in example - on server side i don't want fetching data by http - i want use service class on backend this work with mysql
on frontend this work with http rest api
|
Beta Was this translation helpful? Give feedback.
Hi, thank you for your question!
Are you using Viewi with some framework or as a standalone app?
To get the data you need to create an API endpoint, which will return your data. Then you need to use HttpClient to get that data.
Does this answer your question? Please ping me if needed, I would love to help.