# File lib/puppet/indirector/catalog/compiler.rb, line 15 15: def extract_facts_from_request(request) 16: return unless text_facts = request.options[:facts] 17: raise ArgumentError, "Facts but no fact format provided for %s" % request.name unless format = request.options[:facts_format] 18: 19: # If the facts were encoded as yaml, then the param reconstitution system 20: # in Network::HTTP::Handler will automagically deserialize the value. 21: if text_facts.is_a?(Puppet::Node::Facts) 22: facts = text_facts 23: else 24: facts = Puppet::Node::Facts.convert_from(format, text_facts) 25: end 26: facts.save 27: end