Forked from delraydavis/IDrive-renameFileFolder-REST-API--RUBY.rb
Created
May 15, 2012 03:54
-
-
Save evsapi/2699004 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/renameFileFolder") | |
| request['content-type'] = "application/x-www-form-urlencoded" | |
| parameters['uid'] = <USER ID> | |
| parameters['pwd'] = <USER PASSWORD> | |
| parameters['pvtkey'] = <USER DEFINED PRIVATE KEY> | |
| parameters['oldpath'] = <PATH ON THE SERVER> | |
| parameters['newpath'] = <PATH ON THE SERVER> | |
| 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