X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fvesmgr%2FsubscribexAPPNotifications.go;h=c87a0a3e8bcc5ba97afb79e6aa4f940a2116727d;hb=267b90952fcc7ce831d21631692543d27c1c5f76;hp=1a2b85bebc49f2eae15d5ff612042dbadbd055ad;hpb=6ffba08cc1c469c1ae04a6819445760ec75653b1;p=ric-plt%2Fvespamgr.git diff --git a/cmd/vesmgr/subscribexAPPNotifications.go b/cmd/vesmgr/subscribexAPPNotifications.go index 1a2b85b..c87a0a3 100644 --- a/cmd/vesmgr/subscribexAPPNotifications.go +++ b/cmd/vesmgr/subscribexAPPNotifications.go @@ -38,7 +38,7 @@ var errPostingFailed = errors.New("Posting subscriptions failed") var errWrongStatusCode = errors.New("Wrong subscriptions response StatusCode") func subscribexAppNotifications(targetURL string, subscriptions chan subscriptionNotification, timeout time.Duration, subsURL string) { - requestBody := []byte(fmt.Sprintf(`{"maxRetries": 5, "retryTimer": 5, "eventType":"all", "targetUrl": "%v"}`, targetURL)) + requestBody := []byte(fmt.Sprintf(`{"Data": {"maxRetries": 5, "retryTimer": 5, "eventType":"all", "targetUrl": "%v"}}`, targetURL)) req, err := http.NewRequest("POST", subsURL, bytes.NewBuffer(requestBody)) if err != nil { logger.Error("Setting NewRequest failed: %s", err) @@ -65,7 +65,7 @@ func subscribexAppNotifications(targetURL string, subscriptions chan subscriptio func subscribexAppNotificationsClientDo(req *http.Request, client *http.Client) (string, error) { resp, err := client.Do(req) if err != nil { - logger.Error("Posting subscriptions failed: %s", err) + logger.Error("Posting subscriptions failed: %v", err) return "", errPostingFailed } defer resp.Body.Close()