mirror of
https://github.com/rancher/norman.git
synced 2025-09-19 01:17:04 +00:00
Add action to url builder
This commit is contained in:
committed by
Darren Shepherd
parent
df13831994
commit
f26502f753
@@ -254,3 +254,7 @@ func parseResponseURLBase(requestURL string, r *http.Request) (string, error) {
|
||||
|
||||
return requestURL[0:index], nil
|
||||
}
|
||||
|
||||
func (u *urlBuilder) Action(action string, resource *types.RawResource) string {
|
||||
return u.constructBasicURL(resource.Schema.Version, resource.Schema.PluralName, resource.ID) + "?action=" + url.QueryEscape(action)
|
||||
}
|
||||
|
Reference in New Issue
Block a user