Browse Source

小程序码问题debug

master v0.3.5
lijianbin 1 year ago
parent
commit
4046688a55
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      http.go

+ 1
- 2
http.go View File

@ -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 {


Loading…
Cancel
Save