-package httpclient
-
/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- *
- *******************************************************************************/
+* Copyright 2019 Samsung Electronics All Rights Reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* 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.
+*
+*******************************************************************************/
+package httpclient
import (
"encoding/json"
-package httpclient_test
-
/*******************************************************************************
* Copyright 2019 Samsung Electronics All Rights Reserved.
*
*
*******************************************************************************/
+package httpclient_test
+
import (
"fmt"
"log"
"scoringmgr"
"securemgr"
"servicemgr"
- "strconv"
"strings"
"testing"
"time"
appInfo := make(map[string]interface{})
appInfo["ServiceName"] = serviceName
- appInfo["NotificationTargetURL"] = httpclient.ConstPrefixHTTP +
- targetRemoteDeviceAddr + ":" + strconv.Itoa(httpclient.ConstWellknownPort)
+ appInfo["NotificationTargetURL"] = targetRemoteDeviceAddr
err := httpclient.DoExecuteRemoteDevice(appInfo, targetRemoteDeviceAddr)
//working on
time.Sleep(time.Duration(3) * time.Second)
- scoreValue, err := httpclient.DoGetScoreRemoteDevice("ls", targetRemoteDeviceAddr)
+ scoreValue, err := httpclient.DoGetScoreRemoteDevice(serviceName, targetRemoteDeviceAddr)
log.Printf("scorevalue : %f\n", scoreValue)
if err != nil {
-package servicemgr
-
/*******************************************************************************
* Copyright 2019 Samsung Electronics All Rights Reserved.
*
*
*******************************************************************************/
+package servicemgr
+
import (
"log"
"os"
-package servicemgr
-
/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- *
- *******************************************************************************/
+* Copyright 2019 Samsung Electronics All Rights Reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* 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.
+*
+*******************************************************************************/
+
+package servicemgr
import (
"common"