module Falconz::REST::POST

Public Instance Methods

post_request(path, json: false, **options) click to toggle source
# File lib/falconz/rest/post.rb, line 4
def post_request(path, json: false, **options)
  response = HTTParty.post(url + path, 
                          headers: header,
                          body: options)
  if response.success?
    return response.body if json
    return response
  else
    raise RuntimeError, response.to_h
  end
end