lib/nexpose/ajax.rb
def post(nsc, uri, payload = nil, content_type = CONTENT_TYPE::XML)
      post = Net::HTTP::Post.new(uri)
      post.set_content_type(content_type)
      post.body = payload.to_s if payload
      _request(nsc, post)
    end
# POST call to a Nexpose controller.
#
# @param [Connection] nsc API connection to a Nexpose console.
# @param [String] uri Controller address relative to https://host:port
# @param [String|REXML::Document] payload XML document required by the call.
# @param [String] content_type Content type to use when issuing the POST.
# @return [String|REXML::Document|Hash] The response from the call.
#
POST call to a Nexpose controller.
POST call to a Nexpose controller .
def post(nsc, uri, payload = nil, content_type = CONTENT_TYPE::XML)
      post = Net::HTTP::Post.new(uri)
      post.set_content_type(content_type)
      post.body = payload.to_s if payload
      _request(nsc, post)
    end
def post ( nsc , uri , payload = nil , content_type = CONTENT_TYPE :: XML ) post = Net :: HTTP :: Post . new ( uri ) post . set_content_type ( content_type ) post . body = payload . to_s if payload _request ( nsc , post ) end
POST call to a Nexpose controller.
POST call to a Nexpose controller .
The response from the call.
The response from the call .
String|REXML::Document|Hash
nsc
uri
payload
content_type
content_type Content type to use when issuing the POST.
content_type Content type to use when issuing the POST .