fleet/server/service/transport_targets.go

18 lines
313 B
Go
Raw Normal View History

2016-11-02 14:59:53 +00:00
package service
import (
"encoding/json"
"net/http"
"golang.org/x/net/context"
)
func decodeSearchTargetsRequest(ctx context.Context, r *http.Request) (interface{}, error) {
var req searchTargetsRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, err
}
return req, nil
}