DEV Community

CoreDataHero
CoreDataHero

Posted on

Use TraceEagle to Compare Captured Requests Side by Side with Diff, Pinpointing Every Difference Line by Line

Request Diff

This guide shows you how to compare two requests / responses side by side, line by line: select one and mark it as A, then choose "Compare with A" on another, and the tool immediately opens a side-by-side window marking every difference line by line. "Why did it succeed this time but fail last time?" "For the same API, which line exactly differs between success and failure?" — one comparison tells you. The two records don't have to come from the same session; you can compare across sessions and sources.

1. When to use it

It fits if any of the following applies:

  • You want to figure out why two requests behave differently: success vs. failure, working vs. erroring — which header, which parameter, which part of the body differs.
  • You manually crafted / replayed a request and want to check it against the one actually captured — is the signature right, are the fields all there.
  • After changing the server / client, you want to confirm what exactly changed in this request or response before and after the change, and whether there are side effects.
  • The same API returns inconsistent results between test and production, and you want to quickly determine whether it's a config difference or a data difference.

If you've only captured one flow and have no second one to compare against, capture another one first, or use Request Crafting & Replay to create one, then come back to compare.

2. Prerequisites

  • TraceEagle is installed and running, and you've captured (or crafted) at least two flows.
  • Both flows just need to be visible in the UI — they don't have to come from the same capture session, nor to have been captured at the same time.
  • To compare response bodies, make sure that flow's response is decrypted / readable (the details show "Decrypted" for TLS); if one side isn't decrypted, the tool will say so during comparison.

3. Step-by-step: two steps to a diff

  1. Right-click any flow and click "Mark as Comparison A" in the context menu. That flow is recorded as side A.

  2. Find the other flow to compare it with (one in the same session, one in another session, or one captured after replaying from the crafter — any will do), right-click it, and click "Compare with A".

  3. A side-by-side comparison window opens immediately: A on the left, B on the right, each with its own label (method · host · status), so you know at a glance which two you're comparing.

  4. At the top of the window, switch with one click between comparing the request and the response. Both sides switch in sync.

  5. Read the differences line by line: added (+), removed (−), and changed (~) are highlighted separately, with red on side A and green on side B; changed lines are shown side by side for comparison. The top also gives a line-count summary of "added / removed / changed".

The comparison covers everything in a message: the start line (request line / status line), all request / response headers, and the request / response body. The body is auto-prettified first and then compared line by line, so JSON, XML, and forms are all easy to read — the fields that actually changed stand out immediately, without interference from formatting noise such as line breaks or indentation.

4. Verification: make sure the comparison is trustworthy

After opening the comparison window, check the following points to confirm the result is unambiguous:

  • The labels on both sides match: A on the left, B on the right, and their method · host · status match the two you intended to compare — no mis-selection.
  • Request / response switching works: switch to "Request" at the top to view request headers and body, switch to "Response" to view the status code and response body; both sides change in sync.
  • Differences are colored and counted: changed lines are colored, and the line-count summary at the top matches the differences you see with your own eyes.
  • Identical content is explicitly reported: when the two are the same, the tool tells you "identical" directly, so you don't have to check line by line; if one side has no content or is not yet decrypted, it also says so, instead of leaving you waiting.

5. Tips and troubleshooting

Symptom / Thought Most likely cause What to do
Clicking "Compare with A" in the menu does nothing A hasn't been marked yet First right-click one flow and choose "Mark as Comparison A", then choose "Compare with A" on the other
The two flows you want to compare are in different sessions You assume comparison only works within one session Not necessary — as long as both are visible in the UI you can compare them; A and B can be cross-session and cross-source
The response side is blank / says not decrypted That flow's response isn't decrypted yet, or simply has no body Decrypt that flow first (the details show "Decrypted" for TLS), then compare; see Viewing & Decoding Data
You want to verify "did I craft it correctly" The hand-crafted request and the real request aren't viewed side by side Replay / send it in Request Crafting & Replay, capture the resulting flow, then "Compare with A" against the real historical request to check the signature and fields line by line
The body diff looks large but is actually just different formatting Formatting noise such as line breaks / indentation Don't worry — the body is auto-prettified before comparison, so what's marked are the fields that actually changed, not formatting jitter
You compared the wrong two / want to swap one out A still points to the old flow Right-click the new target and choose "Mark as Comparison A" again to overwrite the old A, then pick B

Next steps

  • To read and decode a flow before comparing it: see Viewing & Decoding Data.
  • To craft a request / replay it and capture it for checking against a real request: see Request Crafting & Replay.
  • To see who this request is sent to and what the other side is: see Host Details.
  • Private / proprietary protocols need to be understood before comparison: see Custom Protocol Decoding.

Top comments (0)