def http_put(opts={})
      ret=http_put_low(opts)
      if ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' then
	authdefault
	ret=http_put_low(opts)
	return ret
      else
	return ret
      end
    end
def http_put(opts={})
      ret=http_put_low(opts)
      if ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' then
	authdefault
	ret=http_put_low(opts)
	return ret
      else
	return ret
      end
    end
private?

 Perform HTTP put method with uri, data and fields

 returns: HTTP result object

 Usage:

  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')
  payload = {
    :password => password,
    :json => 1
  }
  res = n.http_put(:uri=>"/users/#{user_id}/chpasswd", :data=>payload, :fields=>n.x_cookie)
  puts res.code