I am working on a Ruby on Rails App.I have to make a GET request to following:
https://[@subdomain].chargify.com/subscriptions/[@subscription.id].json
The response received is going to be json. I am trying to achieve this by making the GET request using the 'net/http' library of ruby and my code is as follows :
res = Net::HTTP.get(URI.parse('https://[@subdomain].chargify.com/subscriptions/[@subscription_id].json'))
But I am getting an error which is :
bad URI(is not URI?): https://[@subdomain].chargify.com/subscriptions/[@subscription_id].json
I am not sure where exactly am I making mistake with this. Any suggestions or help would be appreciated.
Thanks
400 Bad Request