Skip to content

Instantly share code, notes, and snippets.

@bdwill
Created February 19, 2017 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdwill/04b5ab61c200eaaa8af41c5d756a3d27 to your computer and use it in GitHub Desktop.
Save bdwill/04b5ab61c200eaaa8af41c5d756a3d27 to your computer and use it in GitHub Desktop.
Ruby Rest-Client Test
require 'rubygems'
require 'rest_client'
login = RestClient::Request.execute(
:method => :post,
:url => 'https://10.1.1.1/api/1.9/auth/session',
:payload => { api_token: 'xxxxxxxxxxxxxxxxxxx' },
:verify_ssl => false)
response = RestClient::Request.execute(
:method => :get,
:url => 'https://10.1.1.1/api/1.9/volume/Test-03',
:cookies => login.cookies,
:verify_ssl => false)
puts response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment