Sha256: 05b020c17110e7f6ff3fe792276af04cc308212e23e973af252c77758a32f40e

Contents?: true

Size: 396 Bytes

Versions: 1

Compression:

Stored size: 396 Bytes

Contents

require 'httpclient'

class HttpClient
  def initialize
    @client = HTTPClient.new
  end

  def headers(api_key)
    {
        "Content-Type" => 'application/json',
        "User-Agent" => 'SecureNative-ruby',
        "Sn-Version" => Config::SDK_VERSION,
        "Authorization" => api_key
    }
  end

  def post(url, api_key, body)
    @client.post(url, body, self.headers(api_key))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
securenative-0.1.5 lib/securenative/http_client.rb