Skip to content

Commit

Permalink
Add two additional valid http methods: HEAD and OPTIONS (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Strickland authored Oct 21, 2020
1 parent 4ddc601 commit fb7c236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func preProcessTest(test *Test, defaultHost string) error {

// Method
method := stringValue(test.Request.Method, "GET")
if method != "GET" && method != "POST" && method != "PUT" && method != "PATCH" && method != "DELETE" {
return fmt.Errorf("invalid method %s. only GET, POST, PUT, PATCH, DELETE are supported", method)
if method != "GET" && method != "POST" && method != "PUT" && method != "PATCH" && method != "DELETE" && method != "HEAD" && method != "OPTIONS" {
return fmt.Errorf("invalid method %s. only GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS are supported", method)
}
test.Request.Method = method

Expand Down

0 comments on commit fb7c236

Please sign in to comment.