class Application

Public Class Methods

getData() click to toggle source
# File lib/third-party-services-ericksot.rb, line 5
    def self.getData
resp = nil
            http = Net::HTTP.new('exapi-dev.wwt.com', 443)
            http.use_ssl = true
            http.start do |http|
            req = Net::HTTP::Get.new('/apirouter/api/forward/applications')
            
            # we make an HTTP basic auth by passing the username and password
            req.basic_auth 'atcservice@wwt.com', 'YV^9AecTDBHjZ=M'
            resp = http.request(req)
end
            if resp.code != '200' then
             raise 'The reponse from the applications service is:'+resp.code+' and the messages is'+resp.body.to_s
end
JSON.parse(resp.body)
    end