def body
      raise RequestError, 'The request requires a HTTP method.' unless @http_method
      raise RequestError, 'The payload needs to be a hash.' unless @payload.to_s.empty? || @payload.is_a?(Hash)

      res = Net::HTTP.start(uri.hostname, Yoti.configuration.api_port, use_ssl: https_uri?) do |http|
        signed_request = SignedRequest.new(unsigned_request, path, @payload).sign
        http.request(signed_request)
      end

      raise RequestError, "Unsuccessful Yoti API call: #{res.message}" unless res.code == '200'

      res.body
    end
def body
      raise RequestError, 'The request requires a HTTP method.' unless @http_method
      raise RequestError, 'The payload needs to be a hash.' unless @payload.to_s.empty? || @payload.is_a?(Hash)

      res = Net::HTTP.start(uri.hostname, Yoti.configuration.api_port, use_ssl: https_uri?) do |http|
        signed_request = SignedRequest.new(unsigned_request, path, @payload).sign
        http.request(signed_request)
      end

      raise RequestError, "Unsuccessful Yoti API call: #{res.message}" unless res.code == '200'

      res.body
    end
Makes a HTTP request after signing the headers
 @return [Hash] the body from the HTTP request