Replace Hard-coded HTTP Verbs with Constants (#27219)
* Replace hard-coded HTTP verbs with constants in `net/http`
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e364c2a265
Коммит
d44c3d5d45
@@ -36,7 +36,7 @@ type TestEnvironment struct {
|
||||
|
||||
// Init adds manualtest endpoint to the API.
|
||||
func Init(api4 *api4.API) {
|
||||
api4.BaseRoutes.Root.Handle("/manualtest", api4.APIHandler(manualTest)).Methods("GET")
|
||||
api4.BaseRoutes.Root.Handle("/manualtest", api4.APIHandler(manualTest)).Methods(http.MethodGet)
|
||||
}
|
||||
|
||||
func manualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Ссылка в новой задаче
Block a user