diff --git a/internal/client/route_add.go b/internal/client/route_add.go index 378f2cb..e1cc767 100644 --- a/internal/client/route_add.go +++ b/internal/client/route_add.go @@ -16,5 +16,5 @@ func AddRoute(host, path, method, entrypoint, command string, w io.Writer) error "url_pattern": path, "entrypoint": entrypoint, "command": command}) - return http.Put(url, "application/json", bytes.NewReader(body), w) + return http.Post(url, "application/json", bytes.NewReader(body), w) } diff --git a/internal/client/route_add_test.go b/internal/client/route_add_test.go index 6ff567c..4940388 100644 --- a/internal/client/route_add_test.go +++ b/internal/client/route_add_test.go @@ -10,7 +10,7 @@ import ( func TestSuccessOnCorrectRoute(t *testing.T) { defer gock.Off() gock.New("http://localhost"). - Put("/routes"). + Post("/routes"). MatchType("json"). JSON(map[string]string{ "method": "GET",