/
post file with rest-client

post file with rest-client

require 'rest-client'

# "swagger%201.2"
# "swagger%202.0"
# "swagger%20.0%20yaml"
# "api%20blueprint"
# "wadl"
# "raml%200.8"
# "apimatic"

output_format = "raml%200.8"

uristring = 'https://apitransformer.com/api/transform?output=raml%200.8'

res =  RestClient.post(uristring, 
  :name_of_file_param => File.new('/Users/yetao/SRPAPI.api')
)
puts res.body