Skip to content

Commit

Permalink
Add comment on :predict path addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ukclivecox authored and seldondev committed Jul 24, 2020
1 parent 62d0134 commit e84f710
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions executor/api/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (r *SeldonRestApi) Initialise() {
case api.ProtocolTensorflow:
r.Router.NewRoute().Path("/v1/models/{"+ModelHttpPathVariable+"}/:predict").Methods("OPTIONS", "POST").HandlerFunc(r.wrapMetrics(metric.PredictionHttpServiceName, r.predictions))
r.Router.NewRoute().Path("/v1/models/{"+ModelHttpPathVariable+"}:predict").Methods("OPTIONS", "POST").HandlerFunc(r.wrapMetrics(metric.PredictionHttpServiceName, r.predictions))
// Allow both :predict before and after final / in path.
r.Router.NewRoute().Path("/v1/models/:predict").Methods("OPTIONS", "POST").HandlerFunc(r.wrapMetrics(metric.PredictionHttpServiceName, r.predictions)) // Nonstandard path - Seldon extension
r.Router.NewRoute().Path("/v1/models:predict").Methods("OPTIONS", "POST").HandlerFunc(r.wrapMetrics(metric.PredictionHttpServiceName, r.predictions)) // Nonstandard path - Seldon extension
r.Router.NewRoute().Path("/v1/models/{"+ModelHttpPathVariable+"}").Methods("GET", "OPTIONS").HandlerFunc(r.wrapMetrics(metric.StatusHttpServiceName, r.status))
Expand Down

0 comments on commit e84f710

Please sign in to comment.