Class: OwaspZap::Policy
- Inherits:
-
Object
- Object
- OwaspZap::Policy
- Defined in:
- lib/owasp_zap/policy.rb
Instance Method Summary collapse
- #all(format = "JSON") ⇒ Object
-
#initialize(params = {}) ⇒ Policy
constructor
A new instance of Policy.
Constructor Details
#initialize(params = {}) ⇒ Policy
Returns a new instance of Policy.
3 4 5 |
# File 'lib/owasp_zap/policy.rb', line 3 def initialize(params = {}) @base = params[:base] end |
Instance Method Details
#all(format = "JSON") ⇒ Object
7 8 9 10 11 12 |
# File 'lib/owasp_zap/policy.rb', line 7 def all(format = "JSON") # http://127.0.0.1:8080/JSON/ascan/view/policies/?zapapiformat=JSON url = Addressable::URI.parse "#{@base}/#{format}/ascan/view/policies/" url.query_values = {:zapapiformat=>format} RestClient::get url.normalize.to_str end |