Skip to content

Instantly share code, notes, and snippets.

@codemodify
Last active January 17, 2019 12:01
Show Gist options
  • Select an option

  • Save codemodify/a19229071505d539826d452641c4cebf to your computer and use it in GitHub Desktop.

Select an option

Save codemodify/a19229071505d539826d452641c4cebf to your computer and use it in GitHub Desktop.
qosmicparticles-io-samples.rb
require 'uri'
require 'net/http'
url = URI("http://qosmicparticles.io:4444/FetchGobs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"2.0\",\n \"key\": \"rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr\",\n \"gobSize\": 10\n}"
response = http.request(request)
puts response.read_body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment