class Spectro::HTTPClient

Interact with the API exchanging specs and functions

Public Instance Methods

upload_undefined_specs() click to toggle source
# File lib/spectro/http_client.rb, line 13
def upload_undefined_specs
  uri = URI.parse('http://' + Spectro::Config.api_hostname + '/api/specs')
  file_path = '.spectro/undefined.yml'

  http = Net::HTTP.new(uri.host, uri.port)
  request = Net::HTTP::Post.new(uri.request_uri)
  request.body = File.read(file_path)

  http.request(request)
end