# frozen_string_literal: true require_relative "qas_dock_gem/version" module QasDockGem class RequestsAPI require 'httparty' require 'logger' def execute_post(token, uri, payload, headers) logger = Logger.new(STDOUT) logger.info("Realizando POST") logger.info("URI: #{uri}") logger.info("Payload: #{payload}") logger.info("Headers: #{headers}") params = { :headers => {'cache-control': 'no-cache','content-type': 'application/json'}, :body => payload.to_json } request = HTTParty.post(uri, params) logger.info("POST realizado") request end end end