k.zhang 4 年之前
父節點
當前提交
a939107a2a
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      apis/dyjx/url_jx.go

+ 8 - 6
apis/dyjx/url_jx.go

@@ -10,7 +10,6 @@ import (
 	"fmt"
 	"github.com/asmcos/requests"
 	"github.com/gin-gonic/gin"
-	"io/ioutil"
 	"net/http"
 	"strings"
 )
@@ -135,12 +134,15 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
 	if err != nil {
 		fmt.Println("http get error", err)
 	}
-	body, err := ioutil.ReadAll(respp.Body)
-	if err != nil {
-		fmt.Println("read error", err)
+	//body, err := ioutil.ReadAll(respp.Body)
+	//if err != nil {
+	//	fmt.Println("read error", err)
+	//
+	//}
+	str = respp.Header.Get("Location")
+	fmt.Println("str = ", str)
 
-	}
-	fmt.Println(string(body))
+	//fmt.Println(string(body))
 	//fmt.Println("resp = ", resp.Text())
 	//fmt.Println("resp = ", resp.SaveFile("./name"))
 	//fmt.Println("resp = ", string(resp.Content()))