fleet/server/service/transport_options.go

18 lines
336 B
Go
Raw Normal View History

2016-12-29 18:32:28 +00:00
package service
import (
"context"
2016-12-29 18:32:28 +00:00
"encoding/json"
"net/http"
2017-06-22 19:50:45 +00:00
"github.com/kolide/fleet/server/kolide"
2016-12-29 18:32:28 +00:00
)
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
}