Forum Discussion

btpoole's avatar
btpoole
Channel Surfer
11 years ago

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

4 Replies

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