lib/owasp_zap/alert.rb in owasp_zap-0.0.8 vs lib/owasp_zap/alert.rb in owasp_zap-0.0.9

- old
+ new

@@ -9,10 +9,10 @@ # # the API has an option to give an offset (start) and the amount of alerts (count) as parameter def view(format = "JSON") raise OwaspZap::WrongFormatException,"Output format not accepted" unless ["JSON","HTML","XML"].include?(format) #http://localhost:8080/JSON/core/view/alerts/?zapapiformat=JSON&baseurl=http%3A%2F%2F192.168.1.113&start=&count= - url = Addressable::URI.parse "#{@base}/core/view/alerts/" + url = Addressable::URI.parse "#{@base}/#{format}/core/view/alerts/" url.query_values = {:zapapiformat=>format,:baseurl=>@target} RestClient::get url.normalize.to_str end end end