Skip to content

Instantly share code, notes, and snippets.

@beaucollins
Created March 26, 2010 17:49
Show Gist options
  • Save beaucollins/345167 to your computer and use it in GitHub Desktop.
Save beaucollins/345167 to your computer and use it in GitHub Desktop.
require 'net/http'
http = Net::HTTP.new 'k2master.k2sportsdev.com'
#=> #<Net::HTTP k2master.k2sportsdev.com:80 open=false>
# API_KEY redacted for security
response = http.post '/inventory/status?api_key=API_KEY', File.read('pe.xml'), {'content-type' => 'text/xml'}
#=> #<Net::HTTPOK 200 OK readbody=true>
response.body
#=> "1937"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment