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: 
EngoTom
Visitor

Async HTTP Request

I need to call a URL async and I don't really care about the result as it's just logging Google Analytics entries for my client app.

Can someone show me the quickest way to do this?

THX

BTW this was a great example on checking if a URL is valid but I don't think it's an async call
viewtopic.php?f=34&t=30774&p=187477#p187477
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: Async HTTP Request

This should do it...

http = CreateObject("roUrlTransfer")
http.SetUrl(url)
http.AsyncGetToString()
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
RokuKevin
Visitor

Re: Async HTTP Request

Be careful to keep the http (roUrlTransfer) object in scope (perhaps an m. pseudo global) to insure that the request goes out. Otherwise, you may have a race condition between the http object being destroyed before the request is sent.

--Kevin
0 Kudos
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.