ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.36k stars 177 forks source link

Feature Request - highlighting of script-modified request/responses #1134

Open jbb1003 opened 2 years ago

jbb1003 commented 2 years ago

Proxyman version? (Ex. Proxyman 1.4.3)

2.35.4

macOS Version? (Ex. mac 10.14)

12.0.1

Steps to reproduce

Run a request - and see the response appear in the log Run the same request, using a script to modify the response - the response looks exactly the same, visually (except for having been modified)

Expected behavior

It would be nice if - perhaps optionally - scripts also had the affect of somehow colourising the log to indicate that things have been modified. I don't see anyway to tell that a script has matched and modified a request short of pressing cmd-opt-I and looking at the script console log.

Screenshots (optional)

NghiaTranUIT commented 2 years ago

To determine which request is modified by a script, you can simply open a Summary Tab -> Debugging Tool.

Screen_Shot_2022-02-03_at_09_22_51


For better visual, you can write JS code to highlight or add a comment too to particular request/script too 👍

function onRequest(context, url, request) {
    request.comment = "It's a Request"
    request.color = "red" // red, blue, yellow, purple, gray, green
    return request
}

function onResponse(context, url, request, response) {
    response.comment = "It's a Response"
    response.color = "yellow" // red, blue, yellow, purple, gray, green
    return response
}

Screen_Shot_2021-08-13_at_09_27_36

ref: https://docs.proxyman.io/scripting/snippet-code#comment-and-highlight-with-color