Open mattijsf opened 1 year ago
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.
Yes makes sense 👌
@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.
Just tested. Including the threshold. Works like a charm.
I'm not sure how often people would prefer the filesystem based approach. You could still consider adding it as an (extra) option.
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.
Thanks for adding this so quickly. It's a very welcome change when working with encoded/protobuf data.
Can you elaborate on it? @mattijsf
Proxyman has supported Protobuf: https://docs.proxyman.io/advanced-features/protobuf
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 🙏
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.