Skip to content

Instantly share code, notes, and snippets.

@dchandekstark
Last active August 29, 2015 14:27
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 dchandekstark/539d79d91bfad0179b9d to your computer and use it in GitHub Desktop.
Save dchandekstark/539d79d91bfad0179b9d to your computer and use it in GitHub Desktop.
require 'net/http'
FITS_SERVLET = "http://127.0.0.1:8080/FITSservlet/FitsServlet_2"
uri = URI(FITS_SERVLET)
# replace value with path to file
uri.query = URI.encode_www_form(file: "/tmp/logo.png")
response = Net::HTTP.get_response(uri)
fits_xml = response.body.strip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment