|
|
@ -93,7 +93,7 @@ func (the *HttpHelper) PublishWithHeader(messageBytes []byte, headers map[string |
|
|
|
} |
|
|
|
return resp, err |
|
|
|
} |
|
|
|
func (the *HttpHelper) HttpPostWithParams(queryBody string, params map[string]string) (string, error) { |
|
|
|
func (the *HttpHelper) HttpPostWithParams(urlStr, queryBody string, params map[string]string) (string, error) { |
|
|
|
tr := &http.Transport{ |
|
|
|
DisableKeepAlives: true, |
|
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, |
|
|
@ -103,7 +103,7 @@ func (the *HttpHelper) HttpPostWithParams(queryBody string, params map[string]st |
|
|
|
for k, v := range params { |
|
|
|
UrlParams.Set(k, v) |
|
|
|
} |
|
|
|
targetUrl, _ := url.ParseRequestURI(the.Url) |
|
|
|
targetUrl, _ := url.ParseRequestURI(urlStr) |
|
|
|
targetUrl.RawQuery = UrlParams.Encode() |
|
|
|
|
|
|
|
req, err := http.NewRequest("POST", targetUrl.String(), strings.NewReader(queryBody)) |
|
|
|