proxy
Provides methods for intercepting network traffic via mitmproxy.
assertStatusCode
Assert whether HTTP response status code matches the specified value.
Parameters:
Name | Type | Description |
---|---|---|
|
| A request URL to match verbatim or a RegExp. |
|
| A response status code to match verbatim or a RegExp. |
|
|
|
|
|
|
Returns:
Object
- Network request details if the network request was found.
assertUrl
Assert if network request matching the specified URL.
Parameters:
Name | Type | Description |
---|---|---|
|
| A request URL to match verbatim or a RegExp. |
|
|
|
Returns:
Object
- Network request details if the network request was found.
dispose
Disposes this module.
getRequests
Return all the collected network requests so far.
Returns:
Array.<Object>
- Array containing network requests.
init
Initializes proxy.
** Launching mitmproxy manually:**
Parameters:
Name | Type | Description |
---|---|---|
|
| Proxy port. |
|
|
|
|
|
|
|
|
|
start
Begin collecting network requests.
Any previously collected requests will be discarded.
** Usage example:**
stop
Stop collecting network requests.
waitFor
Wait for a network request.
Parameters:
Name | Type | Description |
---|---|---|
|
| Matching function. Should return true on match, or false otherwise. |
|
|
|
Returns:
Object
- Network request details if the network request was found.
waitForUrl
Wait for a network request matching the specified URL.
Parameters:
Name | Type | Description |
---|---|---|
|
| An URL to match verbatim or a RegExp. |
|
|
|
Returns:
Object
- Network request details if the network request was found.
Last updated