rawlinp commented on a change in pull request #5087:
URL: https://github.com/apache/trafficcontrol/pull/5087#discussion_r504024334
##########
File path: traffic_ops/v3-client/asn.go
##########
@@ -68,24 +68,40 @@ func (to *Session) UpdateASNByID(id int, entity tc.ASN)
(tc.Alerts, ReqInf, erro
}
// Returns a list of ASNs
-func (to *Session) GetASNs() ([]tc.ASN, ReqInf, error) {
- resp, remoteAddr, err := to.request(http.MethodGet, API_ASNS, nil, nil)
+func (to *Session) GetASNsWithHeader(header http.Header) ([]tc.ASN, ReqInf,
error) {
Review comment:
I think since we're updating the ASNs client methods here, we should
make it take a `*url.Values` as the first parameter, which allows the user to
pass the ID or ASN in the request. Then we no longer need
`GetASNByIDWithHeader` and `GetASNByASNWithHeader`. I believe that is the
pattern we're trying to move towards these days.
----------------------------------------------------------------
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]