|
@ -4,6 +4,7 @@ import ( |
|
|
"bytes" |
|
|
"bytes" |
|
|
"encoding/xml" |
|
|
"encoding/xml" |
|
|
"io/ioutil" |
|
|
"io/ioutil" |
|
|
|
|
|
"log" |
|
|
"net/http" |
|
|
"net/http" |
|
|
"strings" |
|
|
"strings" |
|
|
) |
|
|
) |
|
@ -23,6 +24,8 @@ func SendHttp(method, url string, param map[string]string, header ...map[string] |
|
|
paramStr = paramStr[0 : len(paramStr)-1] |
|
|
paramStr = paramStr[0 : len(paramStr)-1] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
log.Println("param",strings.NewReader(paramStr)) |
|
|
|
|
|
|
|
|
req, err := http.NewRequest(method, url, strings.NewReader(paramStr)) |
|
|
req, err := http.NewRequest(method, url, strings.NewReader(paramStr)) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return []byte(""), err |
|
|
return []byte(""), err |
|
|