mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 22:33:23 +00:00
Use http package consts for http methods
This commit replaces occurences of http method strings with the corresponding consts from the http package. *Note* UPDATE is not strictly speaking a valid method and as such isn't part of the http package (should be a PUT or PATCH?) Signed-off-by: John McCabe <john@johnmccabe.net>
This commit is contained in:
@ -29,8 +29,8 @@ func Test_HeadersAdded(t *testing.T) {
|
||||
}
|
||||
|
||||
actualMethods := rr.Header().Get("Access-Control-Allow-Methods")
|
||||
if actualMethods != "GET" {
|
||||
t.Errorf("Access-Control-Allow-Methods: want: %s got: %s", "GET", actualMethods)
|
||||
if actualMethods != http.MethodGet {
|
||||
t.Errorf("Access-Control-Allow-Methods: want: %s got: %s", http.MethodGet, actualMethods)
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user