lib/nexpose/ajax.rb
# POST call to a Nexpose controller that uses a form-post model.
# This is here to support legacy use of POST in old controllers.
#
# @param [Connection] nsc API connection to a Nexpose console.
# @param [String] uri Controller address relative to https://host:port
# @param [Hash] parameters Hash of attributes that need to be sent
#    to the controller.
# @param [String] content_type Content type to use when issuing the POST.
# @return [Hash] The parsed JSON response from the call.
#
POST call to a Nexpose controller that uses a form-post model.
This is here to support legacy use of POST in old controllers.
POST call to a Nexpose controller that uses a form - post model . This is here to support legacy use of POST in old controllers .
def form_post(nsc, uri, parameters, content_type = CONTENT_TYPE::FORM)
      post = Net::HTTP::Post.new(uri)
      post.set_content_type(content_type)
      post.set_form_data(parameters)
      _request(nsc, post)
    end
def form_post ( nsc , uri , parameters , content_type = CONTENT_TYPE :: FORM ) post = Net :: HTTP :: Post . new ( uri ) post . set_content_type ( content_type ) post . set_form_data ( parameters ) _request ( nsc , post ) end
POST call to a Nexpose controller that uses a form-post model.
POST call to a Nexpose controller that uses a form - post model .
The parsed JSON response from the call.
The parsed JSON response from the call .
Hash
nsc
<not_specific>
uri
<not_specific>
parameters
<not_specific>
content_type
<not_specific>
<not_specific>
content_type Content type to use when issuing the POST.
content_type Content type to use when issuing the POST .