Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save evsapi/2699188 to your computer and use it in GitHub Desktop.
Save evsapi/2699188 to your computer and use it in GitHub Desktop.
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/getFolderDetails")
request['content-type'] = "application/x-www-form-urlencoded"
parameters['uid'] = <USER ID>
parameters['pwd'] = <USER PASSWORD>
parameters['p'] = <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