Skip to content

Map Local with Image for Binary File #284

@NghiaTranUIT

Description

@NghiaTranUIT

Description

Currently, if we create a Map Local with a Body (Image or Binary), the body doesn't map properly. It show the placeholder <Binary Body> without mapping the file.

We should port this ticket from macOS: ProxymanApp/Proxyman#1663 to Windows 👍

Acceptance Criteria

  • Able to create a Map Local with a Binary Response Body
  • Save the Binary Body to the Map Local Folder
  • Able to parse the HTTP Message -> Detect if it's FILE_URL format -> Read the Binary and construct the Body

How to test

Happy case

  1. Make an Image Request (https://ph-files.imgix.net/0928c9a0-8584-456f-870c-e802dc01bb60.png)
  2. Right-Click on Proxyman -> Tools -> Map Local
  3. Automatically create a rule, the Body has a new format <FILE_URL="..........">
  • Behind the scenes, Proxyman detects that the body is a Binary Format (Image, PDF, ZIP, not a text-based....) -> Write the binary body to the Map Local Folder (must have UUID name to avoid conflict)

CleanShot 2023-08-07 at 08 45 54@2x

  1. Resend the request again -> Make sure the Response Body is an image
  • Behind the scenes, Proxyman parses the Map Local Message -> Get the body string -> Detect it's <FILE_URL=".........."> (Check the Prefix and Suffix) -> Parse the File URL -> Read the file

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request✅ DoneTicket is resolved

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions