fleet/server/service/transport_options.go

18 lines
354 B
Go
Raw Normal View History

2016-12-29 18:32:28 +00:00
package service
import (
"encoding/json"
"net/http"
2017-02-01 17:20:50 +00:00
"github.com/kolide/kolide/server/kolide"
2016-12-29 18:32:28 +00:00
"golang.org/x/net/context"
)
func decodeModifyOptionsRequest(ctx context.Context, r *http.Request) (interface{}, error) {
var req kolide.OptionRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, err
}
return req, nil
}