This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit 188fe96b9221a53f5b809b3fe22ab3ad6826e533
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Fri Mar 2 09:10:03 2018 -0700

    updated the TO client to use query parameters for the name= lookups
---
 traffic_ops/client/v13/cachegroup.go | 2 +-
 traffic_ops/client/v13/cdn.go        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/traffic_ops/client/v13/cachegroup.go 
b/traffic_ops/client/v13/cachegroup.go
index 2203ffb..27ef2d1 100644
--- a/traffic_ops/client/v13/cachegroup.go
+++ b/traffic_ops/client/v13/cachegroup.go
@@ -101,7 +101,7 @@ func (to *Session) GetCacheGroupByID(id int) 
([]tc.CacheGroup, ReqInf, error) {
 
 // GET a CacheGroup by the CacheGroup name
 func (to *Session) GetCacheGroupByName(name string) ([]tc.CacheGroup, ReqInf, 
error) {
-       url := fmt.Sprintf("%s/name/%s", API_v13_CacheGroups, name)
+       url := fmt.Sprintf("%s?name=%s", API_v13_CacheGroups, name)
        resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
diff --git a/traffic_ops/client/v13/cdn.go b/traffic_ops/client/v13/cdn.go
index 2396c35..5e4c4d5 100644
--- a/traffic_ops/client/v13/cdn.go
+++ b/traffic_ops/client/v13/cdn.go
@@ -101,7 +101,7 @@ func (to *Session) GetCDNByID(id int) ([]tc.CDN, ReqInf, 
error) {
 
 // GET a CDN by the CDN name
 func (to *Session) GetCDNByName(name string) ([]tc.CDN, ReqInf, error) {
-       url := fmt.Sprintf("%s/name/%s", API_v13_CDNs, name)
+       url := fmt.Sprintf("%s?name=%s", API_v13_CDNs, name)
        resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {

-- 
To stop receiving notification emails like this one, please contact
dang...@apache.org.

Reply via email to