Happy Black Friday!
Use
BLACKFRIDAY2024
with
30% OFF
Buy Now

Compare 2 HTTP requests/responses using Proxyman Diff tool

Cover Image for Compare 2 HTTP requests/responses using Proxyman Diff tool

While testing your application, sometimes you might want to compare 2 responses (or requests) to see if there is any difference or if both are having identical properties and values or not. This mini-tutorial would demonstrate how to compare requests/responses using Proxyman Diff tool.

1. Proxyman Diff Tool

  • Diff Tool is one of the most used features on Proxyman which enables developers to diff 2 requests/ responses in terms of: URL, Method, Status Code, Cookie, JSON body,...
  • The 2 compared requests/ responses could be displayed in Side by side or Unified mode.
  • Users are able to use Diff tool along with the Highlight and Comment tool to note down the comparison results.
  • Users could also export the Diff file then open with another tool such as FileMerge

Compare 2 JSON responses with Proxyman

2. How to use Proxyman Diff Tool

  1. From the main Proxyman window, select all the requests you want to compare

Select the requests for comparison

  1. Add the selected requests to the pool by Right-click -> Tools -> Add to Diff pool (you can use ⌘Y as a shortcut)

Add the selected requests to Diff tool

  1. Select 2 requests for the Left and Right panel to start comparison

2.1 Compare 2 requests

The most common use of Diff tool is to compare responses

  1. From the Diff window, select Diff on Response

Compare 2 responses

  1. Proxyman would highlight differences between the 2 responses such as Set-cookie, Runtime,... especially JSON data of the reponse body

2.2 Compare 2 responses

To quickly compare requests

  1. From the Diff window, select Diff on Request

Compare 2 requests

  1. Proxyman would show you differences between the 2 requests such as Content-length, Cookie, query,...

2.3 Switching between 'Side by side' and 'Unified' mode

Selecting the option from drop-down menu would present the comparison Side by side or Unified

  1. This is the view presented when users select the Side by side mode

Render Diff in Side-by-side mode

  1. And the view presented when users select the Unified mode

Render Diff in Unified mode

2.4 Add comments and Highlights

You can use the Highlight and Commenting feature to note down the errors when experiencing an unexpected result while comparison.

Here is an example of using Diff tool along with the Highlight and Comment feature

  1. Right click the request, select Add Comment >> Note down what is expected (you can use ⌘L as a shortcut)

Add comment to the compared request

Add comment to the compared request

  1. Right click the request, select Highlight >> Select the highlight color

Highlight the compared request

This easily mark your failed, succeed request/response with eye-catching colors for your report or further investigation.

Highlight and commenting with Proxyman

2.5 Export Proxyman Diff file

You can export the Diff file to share with other collegues

At the bottom right corner of the Diff window, click Share button >> Undiff >> Select the path and rename the Diff file

Export the Diff file

2.6 Open Diff file with another tool

Subsequently, you can open the Diff file using another tool such as Postman or File Merge.

That's it for today blog. Happy debugging !

Proxyman is a high-performance macOS app, which enables developers to capture and inspect HTTP(s) traffic from apps and domains on iOS devices, iOS Simulators, and Android devices.

Get it at https://proxyman.io/

Noah Tran
Noah Tran