Sfoglia il codice sorgente

opt: curl server去除readBody操作

kuanglingwei 5 mesi fa
parent
commit
fc1e4faadb
1 ha cambiato i file con 0 aggiunte e 7 eliminazioni
  1. 0 7
      curlServer/CurlServer.go

+ 0 - 7
curlServer/CurlServer.go

@@ -5,7 +5,6 @@ import (
 	"context"
 	"github.com/sirupsen/logrus"
 	"gopkg.in/natefinch/lumberjack.v2"
-	"io"
 	"net"
 	"net/http"
 	"runtime"
@@ -85,12 +84,6 @@ func (s *CurlServer) CurlWithResolveParam(ctx context.Context, requestCurlObject
 
 	// 解析响应结果
 	logger.Println("Code = ", resp.StatusCode)
-
-	_, err = io.ReadAll(resp.Body)
-	if err != nil {
-		logger.Error(err.Error())
-		return nil, err
-	}
 	logger.Println("header = ", resp.Header)
 
 	return &curl2.CurlReply{