ocket8888 commented on a change in pull request #4424: Deprecate GET 
cachegroups/:id
URL: https://github.com/apache/trafficcontrol/pull/4424#discussion_r385178119
 
 

 ##########
 File path: traffic_ops/client/cachegroup.go
 ##########
 @@ -122,8 +123,8 @@ func (to *Session) GetCacheGroupsNullable() 
([]tc.CacheGroupNullable, ReqInf, er
 
 // GET a CacheGroup by the CacheGroup ID.
 func (to *Session) GetCacheGroupNullableByID(id int) ([]tc.CacheGroupNullable, 
ReqInf, error) {
-       route := fmt.Sprintf("%s/%d", API_CACHEGROUPS, id)
-       resp, remoteAddr, err := to.request(http.MethodGet, route, nil)
+       url := fmt.Sprintf("%s?id=%v", API_CACHEGROUPS, id)
+       resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
 
 Review comment:
   This is fine, but I'd like to point out that this really is just a request 
path, not a full URL.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to