Skip to content

Commit

Permalink
[fix] add default content-type to POST/PUT method
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimoo committed Feb 11, 2017
1 parent e2dfd77 commit e73584b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,12 @@ func (a *App) ParseArgs(g *gocui.Gui) error {
return errors.New("No HTTP method specified")
}
arg_index++
method := os.Args[arg_index]
if method == "POST" || method == "PUT" {
add_content_type = true
}
vmethod, _ := g.View("method")
setViewTextAndCursor(vmethod, os.Args[arg_index])
setViewTextAndCursor(vmethod, method)
case "-t", "--timeout":
if arg_index == args_len-1 {
return errors.New("No timeout value specified")
Expand Down

0 comments on commit e73584b

Please sign in to comment.