Files
nomad/command/agent/operator_endpoint_ce.go
2023-08-18 07:47:24 +01:00

25 lines
476 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
//go:build !ent
// +build !ent
package agent
import (
"net/http"
)
func (s *HTTPServer) LicenseRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
switch req.Method {
case http.MethodGet:
resp.WriteHeader(http.StatusNoContent)
return nil, nil
case http.MethodPut:
return nil, CodedError(501, ErrEntOnly)
default:
return nil, CodedError(405, ErrInvalidMethod)
}
}