func (client *Client) Get(c context.Context, uri, realIP string, params url.Values, res interface{}) (err error) {
	return client.Do(c, newRequest("GET", uri, realIP, params), res)
}
Get issues a GET to the specified URL.
package xhttp
import (
	"bytes"
	"crypto/md5"
	"crypto/tls"
	"encoding/hex"
	"encoding/json"
	"fmt"
	"github.com/golang/glog"
	"github.com/oikomi/FishChatServer2/common/conf"
	"github.com/oikomi/FishChatServer2/common/itime"
	"github.com/oikomi/FishChatServer2/common/net/trace"
	"github.com/oikomi/FishChatServer2/common/xtime"
	"golang.org/x/net/context"
	"io"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"os"
	"strings"
	"time"
)
const (
	_get          = "GET"
	_post         = "POST"
	_allCheckFile = "/data/www/check.html"
	_moduleName   = "http_client"
)
var (
	_noKickUserAgent = "im"
)
func init() {
	n, err := os.Hostname()
	if err == nil {
		_noKickUserAgent = _noKickUserAgent + n
	}
}
type Client struct {
	conf      *conf.HTTPClient
	timer     *itime.Timer
	client    *http.Client
	dialer    *net.Dialer
	transport *http.Transport
}
func NewClient(c *conf.HTTPClient) *Client {
	client := new(Client)
	client.conf = c
	client.timer = itime.NewTimer(c.Timer)
	client.dialer = &net.Dialer{
		Timeout:   time.Duration(c.Dial),
		KeepAlive: time.Duration(c.KeepAlive),
	}
	client.transport = &http.Transport{
		Dial:            client.dialer.Dial,
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}
	client.client = &http.Client{
		Transport: client.transport,
	}
	return client
}
func (client *Client) SetKeepAlive(d time.Duration) {
	client.dialer.KeepAlive = d
	client.conf.KeepAlive = xtime.Duration(d)
}
func (client *Client) SetTimeout(d time.Duration) {
	client.conf.Timeout = xtime.Duration(d)
}
func (client *Client) SetDialTimeout(d time.Duration) {
	client.dialer.Timeout = d
	client.conf.Dial = xtime.Duration(d)
}