views:

151

answers:

1

Hi.

I have url like this http://example.com/tag/София/new.json and I want to make get request with HTTParty, but when I do HTTPArty.get "http://example.com/tag/София/new.json" I get:

URI::InvalidURIError at / bad URI(is not URI?): link here

Any ideas how to handle this ?

Thanks in advance, Mitko Kostov.

A: 

The standard says "encode the URL as UTF-8, then represent multi-byte sequences as percent-escaped octets." In your case,

http://example.com/tag/%D0%A1%D0%BE%D1%84%D0%B8%D1%8F/new.json
Jonathan Feinberg