|
@@ -4,6 +4,7 @@ import (
|
|
|
"bytes"
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "hongze/hongze_open_api/utils"
|
|
|
"io/ioutil"
|
|
|
"net/http"
|
|
|
"strconv"
|
|
@@ -32,6 +33,8 @@ func GoogleTranslateApi(content string) (contentEnMap map[string]string, err err
|
|
|
err = fmt.Errorf("json.Marshal Err:" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ utils.FileLog.Info("googleTranslateData:"+string(bytesData))
|
|
|
// 将解析之后的数据转为*Reader类型
|
|
|
reader := bytes.NewReader(bytesData)
|
|
|
resp, err := http.Post(googleTranslateUrl, "application/json", reader)
|