- 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 {
+ xapp.Logger.Debug("http client raw response: %v", r)
+ var xApps []rtmgr.XApp
+ err = json.NewDecoder(r.Body).Decode(&xApps)
+ if err != nil {
+ xapp.Logger.Warn("Json decode failed: " + err.Error())
+ }
+ xapp.Logger.Info("HTTP GET: OK")
+ xapp.Logger.Debug("httpGetter.fetchXappList returns: %v", xApps)
+ return &xApps, err
+ }
+ xapp.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, e2murl string,
+ sdlEngine sdl.Engine, rpeEngine rpe.Engine, m *sync.Mutex) error {
+ return nil
+}
+
+func (g *HttpGetter) Terminate() error {
+ return nil