Set x-www-form-urlencoded content-type for non-binary data

Set the add_content_type when adding non-binary data with the "-d" and
"--data" options so that a "Content-Type:
application/x-www-form-urlencoded" header will get added to the
request.
pull/62/head
nwidger 7 years ago
parent dade4d5a47
commit 3dcd3b24d4

@ -1030,6 +1030,7 @@ func (a *App) ParseArgs(g *gocui.Gui, args []string) error {
data := args[arg_index]
if !set_binary_data {
data, _ = url.QueryUnescape(data)
add_content_type = true
}
vdata, _ := g.View(REQUEST_DATA_VIEW)
setViewTextAndCursor(vdata, data)

Loading…
Cancel
Save