[fix] add request data to request history - fixes #133

master
Adam Tauber 3 years ago
parent b654366740
commit 0fdc15aabf

@ -793,6 +793,7 @@ func (a *App) SubmitRequest(g *gocui.Gui, _ *gocui.View) error {
// parse POST/PUT/PATCH data
if r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch {
bodyStr := getViewValue(g, REQUEST_DATA_VIEW)
r.Data = bodyStr
if headers.Get("Content-Type") != "multipart/form-data" {
if headers.Get("Content-Type") == "application/x-www-form-urlencoded" {
bodyStr = strings.Replace(bodyStr, "\n", "&", -1)

Loading…
Cancel
Save