Sha256: bc5557112dd8fa732965a175ea70933da3b23b63411263ec9488f24c590128ac
Contents?: true
Size: 468 Bytes
Versions: 1
Compression:
Stored size: 468 Bytes
Contents
module Assertiva module Requests def self.post(path, params={}) raise NoApiKey unless Assertiva.api_key headers = { authorization: Assertiva.api_key, accept: "application/json;charset=UTF-8", content_type: "application/json;charset=UTF-8" } url = Assertiva.base_url + path begin response = RestClient.post(url, params.to_json, headers) rescue => e e end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
assertiva-0.1.1 | lib/assertiva/requests.rb |