github.com/rentongzhang/docker@v1.8.2-rc1/api/server/server_experimental.go (about)

     1  // +build experimental
     2  
     3  package server
     4  
     5  func (s *Server) registerSubRouter() {
     6  	httpHandler := s.daemon.NetworkApiRouter()
     7  
     8  	subrouter := s.router.PathPrefix("/v{version:[0-9.]+}/networks").Subrouter()
     9  	subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
    10  	subrouter = s.router.PathPrefix("/networks").Subrouter()
    11  	subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
    12  
    13  	subrouter = s.router.PathPrefix("/v{version:[0-9.]+}/services").Subrouter()
    14  	subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
    15  	subrouter = s.router.PathPrefix("/services").Subrouter()
    16  	subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
    17  }