Loading go-apps/meep-vis/server/vis.go +2 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import ( "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" Loading Loading @@ -572,8 +571,8 @@ func updateStoreName(storeName string) { func predictedQosPost(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") var requestData PredictedQos bodyBytes, _ := ioutil.ReadAll(r.Body) err := json.Unmarshal(bodyBytes, &requestData) decoder := json.NewDecoder(r.Body) err := decoder.Decode(&requestData) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, "The request body is either empty or it's an invalid JSON.", http.StatusBadRequest) Loading Loading
go-apps/meep-vis/server/vis.go +2 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import ( "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" Loading Loading @@ -572,8 +571,8 @@ func updateStoreName(storeName string) { func predictedQosPost(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") var requestData PredictedQos bodyBytes, _ := ioutil.ReadAll(r.Body) err := json.Unmarshal(bodyBytes, &requestData) decoder := json.NewDecoder(r.Body) err := decoder.Decode(&requestData) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, "The request body is either empty or it's an invalid JSON.", http.StatusBadRequest) Loading