talis-fb / TReq

A CLI tool for effortless HTTP requests
GNU General Public License v3.0
50 stars 3 forks source link

Only append new payload field like `key=value` in `run` command. #16

Closed talis-fb closed 7 months ago

talis-fb commented 7 months ago

To replicate...

# 1. This post will send the payload json { "user": "Peter", "passoword" : "123" }
treq POST url.com user=Peter passoword=123 --save-as login

# 2. Running this command will send the same above payload
treq run login

# 3. Running this will send payload => { "passwork": "12345" }
treq run login password=12345

# In 3 step payload SHOULD BE = { "user": "Peter", "passoword" : "12345" }
#  appending the new "password" field and keeping all the fields saved before.

The current behavior when using body definition operator in run or edit command is replace all body already saved with the construct in inputs, instead using already saved body only appending the input fields.