psu/client/endpoint_docker_proxy.go
2019-08-26 23:35:34 -04:00

13 lines
342 B
Go

package client
import (
"fmt"
"net/http"
portainer "github.com/portainer/portainer/api"
)
func (n *portainerClientImp) Proxy(endpointID portainer.EndpointID, req *http.Request) (resp *http.Response, err error) {
return n.doWithToken(fmt.Sprintf("endpoints/%v/docker%s", endpointID, req.RequestURI), req.Method, req.Body, req.Header)
}