Method: F5::Icontrol::RAPI#create

Defined in:
lib/f5/icontrol/rapi.rb

#create(options = {}) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/f5/icontrol/rapi.rb', line 43

def create(options = {})
  response = RestClient::Request.execute(method: :post,
                                         url: url,
                                         user: @args[:username],
                                         password: @args[:password],
                                         verify_ssl: OpenSSL::SSL::VERIFY_NONE,
                                         payload: options.to_json,
                                         headers: { "content-type" => "application/json" }
                                        )
  JSON.parse response.body
end