* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
var errWrongStatusCode = errors.New("Wrong subscriptions response StatusCode")
func subscribexAppNotifications(targetURL string, subscriptions chan subscriptionNotification, timeout time.Duration, subsURL string) {
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)
req, err := http.NewRequest("POST", subsURL, bytes.NewBuffer(requestBody))
if err != nil {
logger.Error("Setting NewRequest failed: %s", err)
func subscribexAppNotificationsClientDo(req *http.Request, client *http.Client) (string, error) {
resp, err := client.Do(req)
if err != nil {
func subscribexAppNotificationsClientDo(req *http.Request, client *http.Client) (string, error) {
resp, err := client.Do(req)
if err != nil {