How to send file as payload ?
I tried -d @payload.json , but it didn't work
protocurl -I . -i ..ARequest -o ..AResponse -u localhost:9443/send -d @payload.json
Warning: Couldn't read data from file "payload.json", this makes an
Warning: empty POST.
Hi @Ishmeet ,
protocurl currently doesn't support that. It currently only accepts the payload as a cmd-arg string.
In shells you can instead use this to pipe the contents of a file into the cmd-arg string.
protocurl -d "$(cat payload.json)" <remaining args ...>
However, would you think, that having the curl-like cmd-arg via -d @<filepath> would be a good user improvement?
If so, we can extend protocurl to cover this.
@Ishmeet ping 😇
@GollyTicker ,
Yes definitely, it will be good improvement to add -d @<filepath>.
@Ishmeet . Ok
Unfortunately, I have not much time atm and in near future.
Can you perhaps add it yourself? You'll have it much earlier then.
What do you think? The repository is well documented. Nevertheless, if you have questions you can ask.
@Ishmeet . Ok
Unfortunately, I have not much time atm and in near future.
Can you perhaps add it yourself? You'll have it much earlier then.
What do you think? The repository is well documented. Nevertheless, if you have questions you can ask.
I'll try
@Ishmeet
Did you manage to take a look at it? 😇
@GollyTicker , I finally got time to work on this. Would appreciate ur review https://github.com/qaware/protocurl/pull/181
Thanks for your effort! I took a look at it! :tada: