Class: ZAPv2::Break

Inherits:
Object
  • Object
show all
Defined in:
lib/zap/v2apis/break.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Break

Returns a new instance of Break.



5
6
7
# File 'lib/zap/v2apis/break.rb', line 5

def initialize(client)
  @client = client
end

Instance Method Details

#add_http_breakpoint(string, location, match, inverse, ignorecase) ⇒ Object



25
26
27
# File 'lib/zap/v2apis/break.rb', line 25

def add_http_breakpoint(string, location, match, inverse, ignorecase)
  @client.get("/JSON/break/action/addHttpBreakpoint/?string=#{string}&location=#{location}&match=#{match}&inverse=#{inverse}&ignorecase=#{ignorecase}")
end

#break(type, state, scope) ⇒ Object



29
30
31
# File 'lib/zap/v2apis/break.rb', line 29

def break(type, state, scope)
  @client.get("/JSON/break/action/break/?type=#{type}&state=#{state}&scope=#{scope}")
end

#continueObject



33
34
35
# File 'lib/zap/v2apis/break.rb', line 33

def continue
  @client.get('/JSON/break/action/continue/')
end

#dropObject



37
38
39
# File 'lib/zap/v2apis/break.rb', line 37

def drop
  @client.get('/JSON/break/action/drop/')
end

#http_messageObject



9
10
11
# File 'lib/zap/v2apis/break.rb', line 9

def http_message
  @client.get('/JSON/break/view/httpMessage/')
end

#is_break_allObject



13
14
15
# File 'lib/zap/v2apis/break.rb', line 13

def is_break_all
  @client.get('/JSON/break/view/isBreakAll/')
end

#is_break_requestObject



17
18
19
# File 'lib/zap/v2apis/break.rb', line 17

def is_break_request
  @client.get('/JSON/break/view/isBreakRequest/')
end

#is_break_responseObject



21
22
23
# File 'lib/zap/v2apis/break.rb', line 21

def is_break_response
  @client.get('/JSON/break/view/isBreakResponse/')
end

#remove_http_breakpoint(string, location, match, inverse, ignorecase) ⇒ Object



41
42
43
# File 'lib/zap/v2apis/break.rb', line 41

def remove_http_breakpoint(string, location, match, inverse, ignorecase)
  @client.get("/JSON/break/action/removeHttpBreakpoint/?string=#{string}&location=#{location}&match=#{match}&inverse=#{inverse}&ignorecase=#{ignorecase}")
end

#set_http_message(httpheader, httpbody) ⇒ Object



45
46
47
# File 'lib/zap/v2apis/break.rb', line 45

def set_http_message(httpheader, httpbody)
  @client.get("/JSON/break/action/setHttpMessage/?httpHeader=#{httpheader}&httpBody=#{httpbody}")
end

#stepObject



49
50
51
# File 'lib/zap/v2apis/break.rb', line 49

def step
  @client.get('/JSON/break/action/step/')
end

#wait_for_http_break(poll, keepalive) ⇒ Object



53
54
55
# File 'lib/zap/v2apis/break.rb', line 53

def wait_for_http_break(poll, keepalive)
  @client.get("/JSON/break/pconn/waitForHttpBreak/?poll=#{poll}&keepAlive=#{keepalive}")
end