Method: Puppet::Transport::NexusRestApi#post_request
- Defined in:
- lib/puppet/transport/nexus_rest_api.rb
#post_request(_context, endpoint, data) ⇒ Object
JSON post request against the given api endpoint
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/puppet/transport/nexus_rest_api.rb', line 72 def post_request(_context, endpoint, data) Puppet.runtime[:http].post( build_uri(endpoint), Puppet::Util::Json.dump(data), headers: { 'Content-Type' => 'application/json' }, options: , ) end |