chore: 舍弃 github.com/franela/goreq ,改为 gopkg.in/resty.v1
diff --git a/webservice.go b/webservice.go
index e2819bf..eb8aef2 100644
--- a/webservice.go
+++ b/webservice.go
@@ -8,10 +8,8 @@
 	"encoding/json"
 	"errors"
 	"fmt"
-	"io/ioutil"
 	"net"
 	"net/http"
-	"net/url"
 	"strconv"
 	"strings"
 	"sync"
@@ -20,7 +18,7 @@
 	"crypto/x509"
 
 	log "github.com/Sirupsen/logrus"
-	"github.com/franela/goreq"
+	"gopkg.in/resty.v1"
 )
 
 var (
@@ -117,24 +115,17 @@
 	return 0.0
 }
 
-// DoGet send GET request
-func (w *WebSession) DoGet(uri string, params map[string]string,
-	timeout int) (*goreq.Response, error) {
+// doGet send GET request
+func (w *WebSession) doGet(uri string, params map[string]string,
+	timeout int) (*resty.Response, error) {
 
 	fullURL := w.BaseURL + uri
 
-	vl := url.Values{}
-
-	if params != nil {
-		for k, v := range params {
-			vl.Add(k, v)
-		}
-	}
-	fullURL = fullURL + "?" + vl.Encode()
-	return goreq.Request{Uri: fullURL,
-		Method:   "GET",
-		Insecure: !w.sslVerify,
-		Timeout:  time.Duration(timeout) * time.Second}.Do()
+	resty.SetTimeout(time.Duration(timeout) * time.Second)
+	resp, err := resty.R().
+		SetQueryParams(params).
+		Get(fullURL)
+	return resp, err
 }
 
 // GetTimestamp get time stamp format 20160103133455
@@ -184,8 +175,8 @@
 	return &transport
 }
 
-// DoPost send POST request
-func (w *WebSession) DoPost(uri string, param map[string]string) (*goreq.Response, error) {
+// doPost send POST request
+func (w *WebSession) doPost(uri string, param map[string]string) (*resty.Response, error) {
 	param["app_id"] = w.AppID
 	param["term_id"] = w.TermID
 	param["sign_method"] = "HMAC"
@@ -195,20 +186,13 @@
 	param["sign"] = w.Sign(w.AppID + w.TermID + w.sessionKey + ts)
 
 	fullURL := w.BaseURL + uri
-	data, err := json.Marshal(param)
-	if err != nil {
-		return nil, err
-	}
-	var r *goreq.Response
-	r, err = goreq.Request{
-		Uri:         fullURL,
-		Method:      "POST",
-		ContentType: "application/json",
-		Body:        data,
-		Insecure:    !w.sslVerify,
-		Timeout:     time.Duration(3) * time.Second}.Do()
-	if err != nil || r.StatusCode != 200 {
-		log.Errorf("Status=%v, err=%v", r, err)
+
+	r, err := resty.R().
+		SetHeader("Content-Type", "application/json").
+		SetBody(param).
+		Post(fullURL)
+	if err != nil || r.StatusCode() != 200 {
+		log.Errorf("Status=%v, err=%v", r.StatusCode(), err)
 	}
 	return r, err
 }
@@ -228,9 +212,6 @@
 
 // NewSession new session object
 func NewSession(appid, appsecret, termid, baseurl string, timeout int, sslVerify bool) *WebSession {
-	if transport, ok := goreq.DefaultTransport.(*http.Transport); ok {
-		transport.TLSClientConfig = nil
-	}
 	return &WebSession{
 		AppID:          appid,
 		AppSecret:      appsecret,
@@ -238,9 +219,7 @@
 		BaseURL:        baseurl,
 		DefaultTimeout: timeout,
 		sslVerify:      sslVerify,
-		httpConnectionPool: sync.Pool{New: func() interface{} {
-			return newTransport(baseurl, sslVerify)
-		}}}
+	}
 }
 
 // NewSessionWithCA new session ca
@@ -250,9 +229,11 @@
 	if !certs.AppendCertsFromPEM(ca) {
 		return nil, ErrBadCAPEM
 	}
-	if transport, ok := goreq.DefaultTransport.(*http.Transport); ok {
-		transport.TLSClientConfig = &tls.Config{RootCAs: certs}
-	}
+
+	resty.SetTLSClientConfig(&tls.Config{
+		InsecureSkipVerify: true,
+		RootCAs:            certs,
+	})
 
 	return &WebSession{
 		AppID:          appID,
@@ -275,17 +256,16 @@
 
 	params := make(map[string]string)
 	params["term_id"] = w.TermID
-	r, err := w.DoGet(uri, params, 5)
+	r, err := w.doGet(uri, params, 5)
 
 	if err != nil {
 		return "", err
 	}
-	if r.StatusCode != 200 {
+	if r.StatusCode() != 200 {
 		return "", errors.New("请求失败")
 	}
 
-	body, err := ioutil.ReadAll(r.Body)
-	defer r.Body.Close()
+	body := r.Body()
 
 	s := &FormJSON{}
 	err = json.Unmarshal(body, &s)
@@ -314,20 +294,18 @@
 	params["sign"] = w.Sign(token + params["timestamp"])
 	params["sign_method"] = "HMAC"
 
-	r, err := w.DoGet(uri, params, 5)
-	if r != nil {
-		defer r.Body.Close()
-	}
+	r, err := w.doGet(uri, params, 5)
 	if err != nil {
 		log.Errorf("err = %v\n", err)
 		return err
 	}
-	if r.StatusCode != 200 {
-		log.Errorf(" errcode = %v\n", r.StatusCode)
-		return fmt.Errorf("code %v", r.StatusCode)
+
+	if r.StatusCode() != 200 {
+		log.Errorf(" errcode = %v\n", r.StatusCode())
+		return fmt.Errorf("code %v", r.StatusCode())
 	}
 
-	body, err := ioutil.ReadAll(r.Body)
+	body := r.Body()
 
 	s := &FormJSON{}
 	err = json.Unmarshal(body, &s)
@@ -344,22 +322,18 @@
 	callData := request.Serialize()
 	params := make(map[string]string)
 	params["funcdata"] = callData
-	r, err := w.DoPost("/ecardservice/ecardapi", params)
 
-	if r != nil {
-		defer r.Body.Close()
-	}
+	r, err := w.doPost("/ecardservice/ecardapi", params)
 	if err != nil {
 		log.Errorf(" err = %v\n", err)
 		return nil, err
 	}
 
-	if r.StatusCode != 200 {
-		return nil, fmt.Errorf("Request StatusCode:%v", r.StatusCode)
+	if r.StatusCode() != 200 {
+		return nil, fmt.Errorf("Request StatusCode:%v", r.StatusCode())
 	}
 
-	body, err := ioutil.ReadAll(r.Body)
-	return NewMessageReader(body), nil
+	return NewMessageReader(r.Body()), nil
 }
 
 // CallService call epay service
@@ -372,7 +346,7 @@
 // SetConnectionTimeout set global connection timeout
 func SetConnectionTimeout(ms int) {
 	connectionTimeout = time.Duration(ms) * time.Millisecond
-	goreq.SetConnectTimeout(connectionTimeout)
+	resty.SetTimeout(connectionTimeout)
 }
 
 // CallService2 call epay service
@@ -384,9 +358,9 @@
 	ts := w.GetTimestamp()
 	params["timestamp"] = ts
 
-	vl := &url.Values{}
+	formData := make(map[string]string)
 	for k, v := range params {
-		vl.Set(k, fmt.Sprintf("%v", v))
+		formData[k] = fmt.Sprintf("%v", v)
 	}
 
 	signData := ""
@@ -396,38 +370,29 @@
 		}
 	}
 	signData += ts + w.sessionKey
-	vl.Set("sign_method", "HMAC")
 	log.Debugf("Sign: key[%v] data[%v]\n", w.sessionKey, signData)
-	vl.Set("sign", w.SignWithKey(w.AppSecret, signData))
+	formData["sign_method"] = "HMAC"
+	formData["sign"] = w.SignWithKey(w.AppSecret, signData)
 
 	fullURL := w.BaseURL + path
 	log.Debugf("CallService: %v\n", fullURL)
-	goreq.SetConnectTimeout(connectionTimeout)
-	var r *goreq.Response
-	r, err = goreq.Request{
-		Uri:         fullURL,
-		Accept:      "application/json",
-		ContentType: "application/x-www-form-urlencoded",
-		Method:      "POST",
-		Timeout:     time.Duration(timeout) * time.Second,
-		Body:        vl.Encode()}.Do()
+	r, err := resty.R().
+		SetHeader("Accept", "application/json").
+		SetFormData(formData).
+		Post(fullURL)
 	if err != nil {
 		log.Errorf("Status=%v, err=%v", r, err)
 		return
 	}
-	if r != nil && r.Body != nil {
-		defer r.Body.Close()
-	}
 
-	if r.StatusCode != 200 {
-		log.Errorf("Request Error %v\n", r.StatusCode)
-		err = fmt.Errorf("Request Error, StatusCode : %v", r.StatusCode)
+	if r.StatusCode() != 200 {
+		log.Errorf("Request Error %v\n", r.StatusCode())
+		err = fmt.Errorf("Request Error, StatusCode : %v", r.StatusCode())
 		return
 	}
 
-	body, err := ioutil.ReadAll(r.Body)
 	var s interface{}
-	err = json.Unmarshal(body, &s)
+	err = json.Unmarshal(r.Body(), &s)
 	if err != nil {
 		log.Errorf("json unmarshal err %v", err)
 		return