func buildResponse(httpReq *Request, httpResp *http.Response) (*Response, error) {
	content, err := ioutil.ReadAll(httpResp.Body)
	if err != nil {
		if !errors.Is(err, io.ErrUnexpectedEOF) {  
			return nil, WrapErr(err, "read Response.Body failed")
		}
	}
	return &Response{
		URL:           httpReq.URL,
		StatusCode:    httpResp.StatusCode,
		Proto:         httpResp.Proto,
		Headers:       httpResp.Header,
		Cookies:       httpResp.Cookies(),
		Request:       httpReq,
		ContentLength: httpResp.ContentLength,
		Content:       content,
		encoding:      "UTF-8",
	}, nil
}
buildResponse build response with http.Response after do request.
package direwolf
import (
	"bytes"
	"context"
	"errors"
	"io"
	"io/ioutil"
	"net/http"
	"strings"
	"time"
)
func send(session *Session, req *Request) (*Response, error) {
	timeout := time.Second * 30
	if req.Timeout > 0 {
		timeout = time.Second * time.Duration(req.Timeout)
	} else if session.Timeout > 0 {
		timeout = time.Second * time.Duration(session.Timeout)
	}
	ctx, timeoutCancel := context.WithTimeout(context.Background(), timeout)
	if req.Proxy != nil {
		ctx = context.WithValue(ctx, "http", req.Proxy.HTTP)
		ctx = context.WithValue(ctx, "https", req.Proxy.HTTPS)
	} else if session.Proxy != nil {
		ctx = context.WithValue(ctx, "http", session.Proxy.HTTP)
		ctx = context.WithValue(ctx, "https", session.Proxy.HTTPS)
	}
	if req.RedirectNum == 0 {
		ctx = context.WithValue(ctx, "redirectNum", 10)
	} else if req.RedirectNum > 0 {
		ctx = context.WithValue(ctx, "redirectNum", req.RedirectNum)
	} else {
		ctx = context.WithValue(ctx, "redirectNum", 0)
	}
	httpReq, err := http.NewRequestWithContext(ctx, req.Method, req.URL, nil)
	if err != nil {
		timeoutCancel()
		return nil, WrapErr(err, "build Request error, please check request url or request method")
	}
	httpReq.Header = mergeHeaders(req.Headers, session.Headers)
	if req.PostForm != nil {
		httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
		data := req.PostForm.URLEncode()
		httpReq.Body = ioutil.NopCloser(strings.NewReader(data))
	} else if req.Body != nil {
		httpReq.Body = ioutil.NopCloser(bytes.NewReader(req.Body))
	} else if req.JsonBody != nil {
		httpReq.Header.Set("Content-Type", "application/json")
		httpReq.Body = ioutil.NopCloser(bytes.NewReader(req.JsonBody))
	} else if req.MultipartForm != nil {
		httpReq.Header.Set("Content-Type", req.MultipartForm.ContentType())
		httpReq.Body = ioutil.NopCloser(req.MultipartForm.Reader())
	}
	if req.Cookies != nil {
		for _, cookie := range req.Cookies {
			httpReq.AddCookie(cookie)
		}
	}
	resp, err := session.client.Do(httpReq)  
	if err != nil {
		if strings.Contains(err.Error(), "context deadline exceeded") {  
			timeoutCancel()
			return nil, WrapErr(ErrTimeout, err.Error())
		}
		timeoutCancel()
		return nil, WrapErr(err, "Request Error")
	}
	defer func() {
		if err := resp.Body.Close(); err != nil {
			panic(err)
		}
	}()
	response, err := buildResponse(req, resp)
	if err != nil {
		timeoutCancel()
		return nil, WrapErr(err, "build Response Error")
	}
	timeoutCancel()  
	return response, nil
}