Currently, bodies can be added from files by prefixing with @:
fetchr <url> -b @content.json
This is how it works in curl.
However, I am not satisfied with that approach:
- What if the user really wants a
@ at the start of the body?
- Since you need to prefix with
@, you don't get file path completions.
The main obstacle is that fetchr needs to be track of the order of individual body arguments, so adding a new option like --read is not an option. clap, the argument parser, does not give any information about the ordering of arguments.
A possible solution would be to manually parse the process arguments, but that would side-step clap, and also lead to a redundant CLI parse run.
Currently, bodies can be added from files by prefixing with
@:This is how it works in
curl.However, I am not satisfied with that approach:
@at the start of the body?@, you don't get file path completions.The main obstacle is that fetchr needs to be track of the order of individual body arguments, so adding a new option like
--readis not an option.clap, the argument parser, does not give any information about the ordering of arguments.A possible solution would be to manually parse the process arguments, but that would side-step
clap, and also lead to a redundant CLI parse run.