Files
kapow/internal/client/route_list.go
pancho horrillo d31165c82f Drop trailing slash in URL to query routes
This one slipped through the tests, I think because the automagic handling of
trailing slashes by the net/http muxer.

With it, the command:

    $ kapow route list

fails with a 'Not Found'.
2019-10-20 18:20:46 +02:00

14 lines
262 B
Go

package client
import (
"io"
"github.com/BBVA/kapow/internal/http"
)
// ListRoutes queries the kapow! instance for the routes that are registered
func ListRoutes(host string, w io.Writer) error {
url := host + "/routes"
return http.Get(url, "", nil, w)
}