def post(mws_endpoint, sandbox_str, post_url)
      uri = URI("https://#{mws_endpoint}/#{sandbox_str}/#{AmazonPay::API_VERSION}")
      https = Net::HTTP.new(uri.host, uri.port, @proxy_addr, @proxy_port, @proxy_user, @proxy_pass)
      https.use_ssl = true
      https.verify_mode = OpenSSL::SSL::VERIFY_PEER

      user_agent = { 'User-Agent' => "#{AmazonPay::SDK_NAME}/#{AmazonPay::VERSION}; (#{@application_name + '/' if @application_name}#{@application_version.to_s + ';' if @application_version} #{RUBY_VERSION}; #{RUBY_PLATFORM})" }

      tries = 0
      begin
        response = https.post(uri.path, post_url, user_agent)
        if @log_enabled
          data = AmazonPay::Sanitize.new(response.body)
          @logger.debug("response: #{data.sanitize_response_data}")
        end
        if @throttle.eql?(true)
          raise 'InternalServerError' if response.code.eql?('500')
          raise 'ServiceUnavailable or RequestThrottled' if response.code.eql?('503')
        end
        AmazonPay::Response.new(response)
      rescue StandardError => error
        tries += 1
        sleep(get_seconds_for_try_count(tries))
        retry if tries <= MAX_RETRIES
        raise error.message
      end
    end
def post(mws_endpoint, sandbox_str, post_url)
      uri = URI("https://#{mws_endpoint}/#{sandbox_str}/#{AmazonPay::API_VERSION}")
      https = Net::HTTP.new(uri.host, uri.port, @proxy_addr, @proxy_port, @proxy_user, @proxy_pass)
      https.use_ssl = true
      https.verify_mode = OpenSSL::SSL::VERIFY_PEER

      user_agent = { 'User-Agent' => "#{AmazonPay::SDK_NAME}/#{AmazonPay::VERSION}; (#{@application_name + '/' if @application_name}#{@application_version.to_s + ';' if @application_version} #{RUBY_VERSION}; #{RUBY_PLATFORM})" }

      tries = 0
      begin
        response = https.post(uri.path, post_url, user_agent)
        if @log_enabled
          data = AmazonPay::Sanitize.new(response.body)
          @logger.debug("response: #{data.sanitize_response_data}")
        end
        if @throttle.eql?(true)
          raise 'InternalServerError' if response.code.eql?('500')
          raise 'ServiceUnavailable or RequestThrottled' if response.code.eql?('503')
        end
        AmazonPay::Response.new(response)
      rescue StandardError => error
        tries += 1
        sleep(get_seconds_for_try_count(tries))
        retry if tries <= MAX_RETRIES
        raise error.message
      end
    end
This method performs the post to the MWS endpoint.
 It will retry three times after the initial post if
 the status code comes back as either 500 or 503.