3rd party API #2373
Unanswered
juan-manuel-alberro
asked this question in
Q&A
3rd party API
#2373
Replies: 1 comment
-
|
Either approach will work for accessing an external API. You can generally prefer queries if you just want some data and not to worry about the specifics of the HTTP requests, and you can use custom APIs if you need more control (such as a non-JSON content type, or special security headers) Another approach is getServerSideProps if the data is specific to a page and is something that you need to be in the initial page render, like SEO meta tags. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys,
I have a question and I wasn't able to find the answer in the documentation, I need to call an external REST API, what's the best practice for those cases? Do I need to create a query (
/queriesfolder and thenuseQuery) or do I need to create a new API (/apifolder) and laterfetchthat endpoint?I believe both options will work but I want to understand the design pattern to follow in Blitz 😃
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions