Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
btpoole
Level 7

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
TheEndless
Level 7

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
Level 7

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
Level 7

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
Level 7

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