fleet/server/service/transport_options.go
2017-02-01 10:20:50 -07:00

18 lines
354 B
Go

package service
import (
"encoding/json"
"net/http"
"github.com/kolide/kolide/server/kolide"
"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
}