|
|
@ -24,8 +24,6 @@ func SendHttp(method, url string, param map[string]string, header ...map[string] |
|
|
|
paramStr = paramStr[0 : len(paramStr)-1] |
|
|
|
} |
|
|
|
|
|
|
|
log.Println("param",strings.NewReader(paramStr)) |
|
|
|
|
|
|
|
req, err := http.NewRequest(method, url, strings.NewReader(paramStr)) |
|
|
|
if err != nil { |
|
|
|
return []byte(""), err |
|
|
@ -100,6 +98,7 @@ func SendXml(method, url string, requestxml interface{}, header ...map[string]st |
|
|
|
*/ |
|
|
|
func PostJson(url string, param []byte, header ...map[string]string) ([]byte, error) { |
|
|
|
httpClient := &http.Client{} |
|
|
|
log.Println("param_code", bytes.NewBuffer(param)) |
|
|
|
|
|
|
|
req, err := http.NewRequest("POST", url, bytes.NewBuffer(param)) |
|
|
|
if err != nil { |
|
|
|