api - How to encode keywords for rotten tomatoes? -


i try query movie called kokowääh rotten tomatoes api.

if put address bar in browser, result: http://www.rottentomatoes.com/search/?search=kokow%e4%e4h

but if send via api, no result.

http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=mykey&q=kokow%e4%e4h&page_limit=3

any idea why?

the rotten tomatoes api expects international characters in query parameters encoded using utf-8, , percent-encoded.

if @ i/o docs example page , ask generate url search "kokowääh", gen url like:

http://api.rottentomatoes.com/api/public/v1.0/movies.json?q=kokow%c3%a4%c3%a4h&page_limit=10&page=1&apikey= 

here can see there 2 percent-encoded bytes per character, each couple of bytes utf-8 encoding of 1 character.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -