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