RUBY Example

From CDYNE Wiki
Jump to navigation Jump to search

CheckPhoneNumber

 1 require 'net/http'
 2 require 'URI'
 3  
 4 puts URI.methods
 5  
 6 url=URI.parse('http://ws.cdyne.com/phoneverify/phoneverify.asmx/CheckPhoneNumber?PhoneNumber=17575449510&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591')
 7  
 8 res = Net::HTTP.get_response(url)
 9  
10 data = res.body
11  
12 puts data
13 gets data