#Multiple API calls in Deno Fresh
14 messages · Page 1 of 1 (latest)
sounds like you are definiting multiple get handlers?
I tried to use more than one get in a single handler and it would not allow more that one get
can you show?
I'm just wondering how you can make multiple api calls on a single page. I couldn't find any examples.
and that doesnt work?
No, when I try to make more than one api call in a single handler it gives a warning saying 'more than one get'.
but from that error you are defining multiple GET handlers
It errors and says "Duplicate key 'GET'"
yea you are defining multiple GET handlers
Do you just make multiple fetch statements in one GET handler?
yes
Ok, Thank you! One last thing, how do you return multiple values from a GET hanlder?
just return an object or array containing your data