mhoppa commented on a change in pull request #4356: Update generic API Create to allow arrays in POST if set on object URL: https://github.com/apache/trafficcontrol/pull/4356#discussion_r379528313
########## File path: traffic_ops/client/parameter.go ########## @@ -48,6 +48,25 @@ func (to *Session) CreateParameter(pl tc.Parameter) (tc.Alerts, ReqInf, error) { return alerts, reqInf, nil } +// Create multiple Parameters +func (to *Session) CreateMultipleParameters(pls []tc.Parameter) (tc.Alerts, ReqInf, error) { + + var remoteAddr net.Addr + reqBody, err := json.Marshal(pls) + reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: remoteAddr} + if err != nil { + return tc.Alerts{}, reqInf, err + } + resp, remoteAddr, err := to.request(http.MethodPost, API_v13_Parameters, reqBody) Review comment: not your fault but can you change this to using apiBase directly instead of v13 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services