module Idonethis::Adapters
  module Internet
    class << self
      require 'restclient'

      def get(url, headers = {}, body = {})
        RestClient.get(url, headers) do |response, _, __|
          response
        end
      end

      def post(url, headers = {}, body = {})
        RestClient.post(url, body, headers) do |response, _, __|
          response
        end
      end
    end
  end
end