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: 
renojim
Community Streaming Expert

Re: Caret in URL

I guess you'd have to ask Yahoo. The caret is part of a query.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
kbenson
Visitor

Re: Caret in URL

"renojim" wrote:
I guess you'd have to ask Yahoo. The caret is part of a query.


Yahoo may require a caret in the parameter name, but they almost definitely accept it URI encoded (it's generally the web server's responsibility to unescape, not the web-app). ^ is %5E escaped, if you want to test manually.

Make sure to encode only the parameter names and values in the string, not the full URL to post to, since it will see :, /, and = as values that need to be escaped. E.g.

$ perl -MURI::Escape -e 'print uri_escape("http://example.com?^foo=bar")."\n";'
http%3A%2F%2Fexample.com%3F%5Efoo%3Dbar


What you really want is something like:

$ perl -MURI::Escape -e 'print "http://example.com?".uri_escape("^foo")."=".uri_escape("bar")."\n";'
http://example.com?%5Efoo=bar


Needless to say, escaping the entire URL, or even just the full param string, will lead to problems.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos
renojim
Community Streaming Expert

Re: Caret in URL

The first thing I tried was to replace the caret, and only the caret, with %5E. It didn't work. The parameter, which is one of several, was just ignored.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
kbenson
Visitor

Re: Caret in URL

That's odd. There doesn't happen to be a test URL with a known response provided by yahoo, does there? That would make testing for the rest of us easier without revealing anything specific to your account there, if that mattes.
-- GandK Labs
Check out Reversi! in the channel store!
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.