From f7580b38bcea4a55f88eb56ddecc80183ac9e8b4 Mon Sep 17 00:00:00 2001 From: Brett Demetris Date: Mon, 8 Jan 2018 17:24:04 -0800 Subject: [PATCH] remove expectation of json from decodeListDeviceRequest (#365) --- platform/device/get_devices.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/platform/device/get_devices.go b/platform/device/get_devices.go index a6b89aec..7667cb7c 100644 --- a/platform/device/get_devices.go +++ b/platform/device/get_devices.go @@ -2,7 +2,6 @@ package device import ( "context" - "encoding/json" "net/http" "time" @@ -51,9 +50,6 @@ func (r getDevicesResponse) Failed() error { return r.Err } func decodeListDevicesRequest(ctx context.Context, r *http.Request) (interface{}, error) { defer r.Body.Close() var opts ListDevicesOption - if err := json.NewDecoder(r.Body).Decode(&opts); err != nil { - return nil, err - } req := getDevicesRequest{Opts: opts} return req, nil }