func (h helperImpl) DoGet(targetURL string) (respBytes []byte, statusCode int, err error) {
	req, err := http.NewRequest("GET", targetURL, nil)
	if err != nil {
		return
	}
	resp, err := h.c.Do(req)
	if err != nil {
		log.Printf("[%v] reqeust get failed !!, err = %v", targetURL, err)
		return
	}
	defer resp.Body.Close()
	statusCode = resp.StatusCode
	respBytes, err = ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Printf("[%v] read resp.Body failed !!, err = %v", targetURL, err)
		return
	}
	return
}
DoGet is for get request
package resthelper
import (
	"bytes"
	"fmt"
	"io/ioutil"
	"net/http"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/logmgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/restinterface/resthelper/client"
	"github.com/lf-edge/edge-home-orchestration-go/internal/restinterface/resthelper/client/httphelper"
	"github.com/lf-edge/edge-home-orchestration-go/internal/restinterface/resthelper/client/tlshelper"
	"github.com/lf-edge/edge-home-orchestration-go/internal/restinterface/tls"
)
type RestHelper interface {
	urlHelper
	requestHelper
	responseHelper
}
type WithCertificateSetter interface {
	urlHelper
	requestHelper
	responseHelper
	tls.CertificateSetter
}
type urlHelper interface {
	MakeTargetURL(target string, port int, restapi string) string
}
type requestHelper interface {
	DoGet(targetURL string) (respBytes []byte, statusCode int, err error)
	DoGetWithBody(targetURL string, bodybytes []byte) (respBytes []byte, statusCode int, err error)
	DoPost(targetURL string, bodybytes []byte) (respBytes []byte, statusCode int, err error)
	DoDelete(targetURL string) (respBytes []byte, statusCode int, err error)
}
type responseHelper interface {
	Response(w http.ResponseWriter, bytes []byte, httpStatus int)
}
type helperImpl struct {
	c client.Requester
	tls.HasCertificate
}
var (
	helper *helperImpl
	log    = logmgr.GetInstance()
)
func init() {
	helper = new(helperImpl)
}
func GetHelper() RestHelper {
	switch helper.IsSetCert {
	case true:
		helper.c = tlshelper.TLSHelper{}
	default:
		helper.c = httphelper.HTTPHelper{}
	}
	return helper
}
func GetHelperWithCertificate() WithCertificateSetter {
	return helper
}