diff --git a/internal/glance/widget-custom-api.go b/internal/glance/widget-custom-api.go index 3c2ca755..610d8aec 100644 --- a/internal/glance/widget-custom-api.go +++ b/internal/glance/widget-custom-api.go @@ -640,6 +640,10 @@ var customAPITemplateFuncs = func() template.FuncMap { URL: url, } }, + "withMethod": func(method string, req *CustomAPIRequest) *CustomAPIRequest { + req.Method = method + return req + }, "withHeader": func(key, value string, req *CustomAPIRequest) *CustomAPIRequest { if req.Headers == nil { req.Headers = make(map[string]string)