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: 
btpoole
Channel Surfer

PostToString and Curl

I am able to perform a curl on a url and receive a file back that can be saved to the computer. All this can be done thru a batch file. Should not GetToFile do the same thing on the Roku? I can use GetToFile, using the same url as in the batch file and then view the information in the file but it is not getting the complete information. Would I first have to PostFromString and pass any parameters to the url. If so how would I store the response?
Thanks
0 Kudos
4 REPLIES 4
TheEndless
Channel Surfer

Re: PostToString and Curl

You can't use GetToFile() to save to your computer, only to the Roku, usually to "tmp:/".
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
btpoole
Channel Surfer

Re: PostToString and Curl

Yes I understand that. If I run a curl with an -o option, the contents of the file saves to the computer. Is there a function that does the same thing for the Roku to save to the tmp? I know GetToFile does this but for some reason it does not get the same information the curl does.
0 Kudos
RokuMarkn
Visitor

Re: PostToString and Curl

Please explain the difference you see in the file you get on the Roku and the one you get on the computer. They should be identical if the URL and headers you send are the same.

--Mark
0 Kudos
btpoole
Channel Surfer

Re: PostToString and Curl

At this point this is no longer important as I eliminated the need. I believe part of the problem was coming from a mid() I was using to extract part of the url being passed to the GetToFile. After much review I think it was a space that was not being picked up on my part. Thanks for offering to review.
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.