Method: Puppet::FileBucketFile::Rest#head
- Defined in:
- lib/puppet/indirector/file_bucket_file/rest.rb
#head(request) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet/indirector/file_bucket_file/rest.rb', line 10 def head(request) session = Puppet.lookup(:http_session) api = session.route_to(:puppet) api.head_filebucket_file( request.key, environment: request.environment.to_s, bucket_path: request.[:bucket_path] ) rescue Puppet::HTTP::ResponseError => e return nil if e.response.code == 404 raise convert_to_http_error(e.response) end |