Get your own customer support community

Recent activity

Subscribe to this feed
  • question

    dewdrops replied on June 11, 2009 06:16 to the question "Can someone help me with the domainr JSON API?" in Domainr:

    dewdrops
    Hey,
    Thanks for the reply.
    It worked with the following code

    url = URI.parse(requrl)
    res = Net::HTTP.get_response(url)
    result=JSON.parse(res.body, {})

    I simply used get_response method instead of dong Get::new and the using start .. pretty silly .. Thanks anyways

    Regards
    M
  • question

    Mayuri asked a question in Domainr on June 05, 2009 08:33:

    Mayuri
    Can someone help me with the domainr JSON API?
    I am trying to implement domainr JSON api into my Ruby on Rails application. But when I try to send a GET request to the service it returns back an empty object.
    Here's what I am writing
    url = URI.parse('http://domai.nr/api/json/search?q=domainr')
    req = Net::HTTP::Get.new(url.path)
    res = Net::HTTP.start(url.host, url.port) {|http|
    http.request(req)
    }
    and here is what I get back
    {\"query\": \"\", \"results\": [], \"error\": {\"status\": 404, \"message\": \"No results found.\"}}

    Can anyone throw some light on this? Where am I going wrong? Thanks for any help in advance.