How to manipulate HTTP response using Proxyman Map Local Tool

Cover Image for How to manipulate HTTP response using Proxyman Map Local Tool

This brief technical blog will demonstrate what Map Local Tool is and how it could help us to quickly manipulate the response.

We hope Proxyman can boost your debugging productivity šŸ‘.

Map Local

1. Map Local Tool

The Map Local Tool enables you to use the content of local files as a response from your requests, which are matched with your rules.

Map Local Tool could significantly boost your speed development and provide the capability to rapidly test on several edge-cased without explicitly updating the data in your server. It's also the must-have tool for QA or Developer if you would like to test the app's behavior with various responses.

2. Benefits of manipulating the HTTP response

There are plenty of scenarios in your debugging time when you would try various type of response to test the layout or content from your devices, apps:

  • Quick Trying new params in responses.
  • Test the app's behaviors with different parameters in the responses.
  • Test the UI layout with unusual contents.
  • Test Localization.
  • Quick reproduce the bug with specific params in responses.

Map Local

3. How it works

  • If the URL of in-coming requests are matching with the pre-defined matching Rule, and the Local file is valid => The body response of those matching requests are automatically replaced with the content of the local file.

  • If the requests are not matching any rules, the entire Response's content remains from the server.

Map Local

4. Matching Rule

You can simply define the rule by a combination of Wildcards and Include subdirectories options.

Map Local

  • Top-Down Matching: Incoming requests will be evaluated by Top-Down priority. The Rule in top of the list is the first rule to evaluate.

  • Asterisk ( * ): Matches any character zero or more times. For example, "*" matches anything beginning with "", such as "", "" and "", ...

  • Question mark ( ? ): Matches a single character once. For example, "" matches and

  • Include subdirectories: All subdirectories will automaitcally match. It's super convenience if you want to match all paths from the domain. For example: "" with ON in "Include subdirectories" matches all URLs, which have "" as a domain, such as "", "", "", "", ....

  • HTTP / HTTPS include: By default, "" matches all requests, which have a scheme is HTTP or HTTPS. Otherwise, "" matches the only HTTP, and "" matches only HTTPS.

Example tables:

| URL | Include subdirectories | Matching URLs | |:-------:|:------:|------------------------------| | | ON |,,,,, ... | |* | ON |,, ... | | * /v1/ * | ON |,, ... | | | ON |,, ... | | | OFF | Only |

5. Remap Response

This table explain what the changes on the Response.

| Match | Response Header | Response Body | |:------------:|:----------------------|:--------------| | Matched | Same Headers from the server.
Remove Content-Encoding and Transfer-Encoding.
Add X-Proxyman-Map-Local: Path File
Update Content-Type: application/json, image/png, text/plain, ... depend on type of files | Replace with the local file | | Not Match | Same Header from server | Same Response body from Server |

6. Addition

Map Local Tools also offer various ways to quickly manipulate the Rule List and support hotkeys as well.

  • āŒ˜ + āŒ„ + L : Quick open Map Local window.
  • āŒ˜ + N : New entry
  • āŒ˜ + E : Edit entry
  • āŒ˜ + D : Duplicate entry
  • āŒ˜ + āŒ« : Delete entry
  • Support Multiple-selection entry
  • Quick the Local File in Finder or your favorited Editor.
  • All changes are immediately applied and you don't need to save.
  • For matched response, the "Content-Type" will automatically replace with the type of local file. Ex: application/json, image/png, image/jpg, .... So the app will handle the response appropriately.

Map Local

7. How to use

There are various ways to access the Map Local Tool. If we open Map Local Tool from Domains or flows, it will fill the matching rule automatically.

Map Local

Proxyman is a high-performance macOS app, which enables developers to capture and inspect HTTP/HTTPS requests from apps and domains on iOS device, iOS Simulator and Android devices.

Get it at

Noah Tran
Noah Tran