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

get contents of http server?

I'm new here but i'm wondering if theres a way I can connect to an http server and get the contents of a path. You know how when you connect to an apache server and if there is no index it just lists all the files? Is there a way that I can get that data? i read through the sdk documents and all the stuff i can find seems like you need to already know the file you want to pull. is this true?

thanks.
0 Kudos
3 REPLIES 3
stratcat96
Visitor

Re: get contents of http server?

you can use an roUrltransfer and the "get" command to send header requests to the server and parse the responses for the info you're looking for I believe. You do though need to know what request to send to give you the desired information in the response. I could be wrong tho 🙂
0 Kudos
kbenson
Visitor

Re: get contents of http server?

"kronusdark" wrote:
IYou know how when you connect to an apache server and if there is no index it just lists all the files?


That's generally a configuration on the server, and is actually the server generating HTML on the fly for the contents. As such, it won't be quite as easy to use through code, but it isn't impossible either. As stratcat96 mentioned, you can use the roURLTransfer object to get the content, but you may need to parse the content it to get the info you want.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos
kronusdark
Visitor

Re: get contents of http server?

thanks, that will help alot!
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.