public interface HttpSenderScript
HTTP message
sent by/through ZAP.
The IDs of the initiators are defined in the HttpSender
class (for example, SPIDER_INITIATOR
).
Note: In the presence of more than one script or, internally, a HttpSenderListener
there are no guarantees
that the (final) request/response is exactly the same as the one crafted by this script, as the
following scripts/listeners may modify it.
Modifier and Type | Method and Description |
---|---|
void |
responseReceived(HttpMessage msg,
int initiator,
HttpSenderScriptHelper helper)
Called after receiving the response from the server (if any).
|
void |
sendingRequest(HttpMessage msg,
int initiator,
HttpSenderScriptHelper helper)
Called before sending the request to the server.
|
void sendingRequest(HttpMessage msg, int initiator, HttpSenderScriptHelper helper) throws ScriptException
Only the request should be modified.
msg
- the HTTP message (request) being sent.initiator
- the ID of the initiator of the HTTP message being sent.helper
- the helper class that allows to send other HTTP messages.ScriptException
- if an error occurred while executing the script.void responseReceived(HttpMessage msg, int initiator, HttpSenderScriptHelper helper) throws ScriptException
msg
- the HTTP message (response) received.initiator
- the ID of the initiator of the HTTP message sent.helper
- the helper class that allows to send other HTTP messages.ScriptException
- if an error occurred while executing the script.