diff --git a/sdk/armcore/connection.go b/sdk/armcore/connection.go index fd1502390cf7..bd91a0c00da1 100644 --- a/sdk/armcore/connection.go +++ b/sdk/armcore/connection.go @@ -69,12 +69,12 @@ func NewConnectionWithPipeline(endpoint string, p azcore.Pipeline) *Connection { return &Connection{u: endpoint, p: p} } -// Do invokes the Do() method on the connection's pipeline. -func (c *Connection) Do(req *azcore.Request) (*azcore.Response, error) { - return c.p.Do(req) -} - // Endpoint returns the connection's ARM endpoint. func (c *Connection) Endpoint() string { return c.u } + +// Pipeline returns the connection's pipeline. +func (c *Connection) Pipeline() azcore.Pipeline { + return c.p +} diff --git a/sdk/armcore/connection_test.go b/sdk/armcore/connection_test.go index 3191cceccf0a..c5da0b37da42 100644 --- a/sdk/armcore/connection_test.go +++ b/sdk/armcore/connection_test.go @@ -56,7 +56,7 @@ func TestNewConnectionWithPipeline(t *testing.T) { if err != nil { t.Fatalf("Unexpected error: %v", err) } - resp, err := con.Do(req) + resp, err := con.Pipeline().Do(req) if err != nil { t.Fatalf("Unexpected error: %v", err) }