- rtmgr.Logger.Debug("http client raw response: %v", r)
- var xapps []rtmgr.XApp
- json.NewDecoder(r.Body).Decode(&xapps)
- rtmgr.Logger.Info("HTTP GET: OK")
- rtmgr.Logger.Debug("httpgetter.fetchXappList returns: %v", xapps)
- return &xapps, err
+
+ if r.StatusCode == 200 {
+ rtmgr.Logger.Debug("http client raw response: %v", r)
+ var xapps []rtmgr.XApp
+ err = json.NewDecoder(r.Body).Decode(&xapps)
+ if err != nil {
+ rtmgr.Logger.Warn("Json decode failed: " + err.Error())
+ }
+ rtmgr.Logger.Info("HTTP GET: OK")
+ rtmgr.Logger.Debug("httpgetter.fetchXappList returns: %v", xapps)
+ return &xapps, err
+ }
+ rtmgr.Logger.Warn("httpgetter got an unexpected http status code: %v", r.StatusCode)
+ return nil, nil
+}
+
+func (g *HttpGetter) Initialize(xmurl string, nbiif string, fileName string, configfile string,
+ sdlEngine sdl.SdlEngine, rpeEngine rpe.RpeEngine, triggerSBI chan<- bool) error {
+ return nil
+}
+
+func (g *HttpGetter) Terminate() error {
+ return nil