Forked from delraydavis/IDrive-validatePrivateKey-REST-API--RUBY.rb
Created
May 14, 2012 21:39
-
-
Save evsapi/2697415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "net/https" | |
| require 'uri' | |
| uri = URI.parse("<SERVER LOCATION>") | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| http.use_ssl = true | |
| http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
| request = Net::HTTP::Post.new("/evs/validatePvtKey") | |
| request['content-type'] = "application/x-www-form-urlencoded" | |
| parameters['uid'] = <USER ID> | |
| parameters['pwd'] = <USER PASSWORD> | |
| parameters['pvtkey'] = <USER DEFINED PRIVATE KEY> | |
| request.set_form_data(parameters) | |
| response = http.request(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment