In this section, we're going to learn more about inline scripts, and we're going to see an example of how to intercept requests and access their different parts of it.
Manipulating HTTP requests
Inline scripts
In the previous section, we defined a simple inline script in order to access the response from a request. Other parts of the communication, the mitmproxy, let us access the response via handlers:
- start: This is called once the script starts up, before any other events
- clientconnect : This is called when a client initiates a connection to the proxy
A connection can correspond to multiple HTTP requests.
- request: This is called when a client request has been received
- serverconnect : This is called when the...