Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aleemaheer
Channel Surfer

Get request to fetch data

I have made a keyboard where users can search, and there are two buttons to search images and the search feed. When a user writes something and clicks on any button, I want to search that user-typed query, I have to make a get request to a backend to get data, but this is not succeeding, this API call is succeeding if I write this in source/main.brs just for testing.

Below my code pictures you can check

https://drive.google.com/file/d/1KEzzZR2RHQEt8vf-p98YcVBspJ5e3M7j/view?usp=sharing

https://drive.google.com/file/d/1ZjJGJ4-EejWTdE9IdDbdKRwMTd5QSFvz/view?usp=sharing

Please help me, I am stucked here, tell me what I am missing, or any resource where can I read this thing clearly

 

0 Kudos
1 REPLY 1
C-DP
Channel Surfer

Re: Get request to fetch data

You need to use a task to make network calls you can’t do them in your ui components. 

Here is the documentation and they have a small sample of using one to load grid content. 

https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.