How can we use GET/POST call with comment componet

I have the API which can get us all the comments, and a post call to update. How can I get/post comment from it.

Please help

@ishi8
Can you explain a little bit more - what are you trying to achieve?

For examole we have a chatting application that has some previous set of chat and an option to add new chat that we can do with comment componet.

But now whta i want to retrive chats from the api and to post new chat through api...to as to get it further

Can you send some screenshots?
You want to continue a chat from your chat application into the Comment component? Combine all chats?

I want to replicate this type of chatting application.

Hey @ishi8!

Setting up a chat window in Retool can be a pretty involved process as there isn't native support for triggering real-time events outside of a user's browser. It's not something I've done myself or typically recommend to people but there are some interesting and different approaches to this general problem:

1. The easiest is to set up a query to run periodically that pings the backend you're using to get updates. This wouldn't let you chat in real-time but you do get an approximation.

2. One of our community members has posted about using WebSockets with Retool if you're interested and up for a good technical read I would definitely check it out!

3. Another user leveraged the 3rd party library ably inside a custom component to create a chat app. I'm attaching the JSON for their app here in case you'd like to explore their solution, note that it needs for you to provide an API key in order to work.
Ably20Test.json

1 Like