mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 00:25:56 +03:00
[GH-ISSUE #1501] Copy cURL with inline binary data #1495
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1495
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mattijsf on GitHub (Jan 16, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1501
Originally assigned to: @NghiaTranUIT on GitHub.
Description
Currently when copying cURL request with binary data a temporary file is created on the user's desktop and the cURL command looks something like this:
While is is short, it is not so convenient when having the intention to share the cURL request with someone else due to having a dependency on an external file.
I propose an alternative or extra approach where binary data is part of the copied cURL command by for example utilizing base64. The command could then look something like this:
Why this feature/change is important?
Proxyman offers convenient ways to share requests. This is just another one and especially useful when sharing requests via text/chat and not being dependant on attachments / absolute file paths.
It might only be convenient for relatively small amount of binary data so maybe it should be limited to a length threshold or provided as an extra option to choose from.
@NghiaTranUIT commented on GitHub (Jan 17, 2023):
It makes sense to support Base 64 Binary data, but I suppose that it's only available for Body Size < 1Mb. I am afraid that it's a huge text if there is no size cap.
If it's > 1Mb, it will fallback to the current behavior.
@mattijsf commented on GitHub (Jan 17, 2023):
Yes makes sense 👌
@NghiaTranUIT commented on GitHub (Jan 17, 2023):
@mattijsf let's try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_4.0.0_cURL_with_base64_binary_body.dmg
I adjust the body size cap to 100Kb (not 1Mb as I propose) because the base64 text is enormous, which is impractical to share.
@mattijsf commented on GitHub (Jan 17, 2023):
Just tested. Including the threshold. Works like a charm.
@mattijsf commented on GitHub (Jan 17, 2023):
I'm not sure how often people would prefer the filesystem based approach. You could still consider adding it as an (extra) option.
@NghiaTranUIT commented on GitHub (Jan 17, 2023):
From what I observed, most users would share the cURL. However, the base64 text is huge.
By following the filesystem-based approach, the user can attach the file along with the cURL.
@mattijsf commented on GitHub (Jan 17, 2023):
Thanks for adding this so quickly. It's a very welcome change when working with encoded/protobuf data.
@NghiaTranUIT commented on GitHub (Jan 17, 2023):
Can you elaborate on it? @mattijsf
Proxyman has supported Protobuf: https://docs.proxyman.io/advanced-features/protobuf
@mattijsf commented on GitHub (Jan 17, 2023):
Yes and I use it extensively as I also commented recently here: https://github.com/ProxymanApp/Proxyman/issues/1430#issuecomment-1364734858
I'm just referring to protobuf since it is a binary format, so when I'm collaborating with other developers this feature request helps allot 🙏