1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00
httparty/examples/idn.rb
Ferdinando Traversa 868053fce7
Add an example about International domain names (#669)
Solution to non-ASCII character problem
2021-06-04 09:01:46 +03:00

10 lines
No EOL
250 B
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'
class Idn
include HTTParty
uri_adapter Addressable::URI
end
pp Idn.get("https://i❤.ws/emojidomain/💎?format=json")