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
2. How to use Proxyman Diff Tool
- From the main Proxyman window, select all the requests you want to compare
- Add the selected requests to the pool by Right-click -> Tools -> Add to Diff pool (you can use ⌘Y as a shortcut)
- 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
- From the Diff window, select Diff on Response
- 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
- From the Diff window, select Diff on Request
- 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
- This is the view presented when users select the Side by side mode
- And the view presented when users select the 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
- Right click the request, select Add Comment >> Note down what is expected (you can use ⌘L as a shortcut)
- Right click the request, select Highlight >> Select the highlight color
This easily mark your failed, succeed request/response with eye-catching colors for your report or further investigation.
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
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/