func (r *Request) HeaderExist(h string) bool {
	if r == nil {
		return false
	}
	_, ok := r.header[h]
	return ok
}
HeaderExist whether specified header exists.
package cast
import (
	"net/http"
	"time"
)
type profiling struct {
	requestStart      time.Time
	requestDone       time.Time
	requestCost       time.Duration
	dnsStart          time.Time
	dnsDone           time.Time
	dnsCost           time.Duration
	connectStart      time.Time
	connectDone       time.Time
	connectCost       time.Duration
	tlsHandshakeStart time.Time
	tlsHandshakeDone  time.Time
	tlsHandshakeCost  time.Duration
	sendingStart      time.Time
	sendingDone       time.Time
	sendingCost       time.Duration
	waitingStart      time.Time
	waitingDone       time.Time
	waitingCost       time.Duration
	receivingSart     time.Time
	receivingDone     time.Time
	receivingCost     time.Duration
}
type Request struct {
	path          string
	method        string
	header        http.Header
	queryParam    interface{}
	pathParam     map[string]interface{}
	body          requestBody
	timeout       time.Duration
	remoteAddress string
	prof          profiling
	rawRequest    *http.Request
	circuitName   string
}
func NewRequest() *Request {
	return &Request{
		method:    http.MethodGet,
		header:    make(http.Header),
		pathParam: make(map[string]interface{}),
		prof: profiling{
			requestStart: time.Now().In(time.UTC),
		},
	}
}
func (r *Request) WithPath(path string) *Request {
	r.path = path
	return r
}
func (r *Request) Options() *Request {
	r.method = http.MethodOptions
	return r
}
func (r *Request) Get() *Request {
	r.method = http.MethodGet
	return r
}
func (r *Request) Head() *Request {
	r.method = http.MethodHead
	return r
}
func (r *Request) Post() *Request {
	r.method = http.MethodPost
	return r
}
func (r *Request) Put() *Request {
	r.method = http.MethodPut
	return r
}
func (r *Request) Delete() *Request {
	r.method = http.MethodDelete
	return r
}
func (r *Request) Trace() *Request {
	r.method = http.MethodTrace
	return r
}
func (r *Request) Connect() *Request {
	r.method = http.MethodConnect
	return r
}
func (r *Request) Patch() *Request {
	r.method = http.MethodPatch
	return r
}
func (r *Request) Method(method string) *Request {
	r.method = method
	return r
}
func (r *Request) WithQueryParam(queryParam interface{}) *Request {
	r.queryParam = queryParam
	return r
}
func (r *Request) WithPathParam(pathParam map[string]interface{}) *Request {
	r.pathParam = pathParam
	return r
}
func (r *Request) WithJSONBody(body interface{}) *Request {
	r.body = &requestJSONBody{
		payload: body,
	}
	return r
}
func (r *Request) WithXMLBody(body interface{}) *Request {
	r.body = &requestXMLBody{
		payload: body,
	}
	return r
}
func (r *Request) WithPlainBody(body string) *Request {
	r.body = &requestPlainBody{
		payload: body,
	}
	return r
}
func (r *Request) WithFormURLEncodedBody(body interface{}) *Request {
	r.body = &requestFormURLEncodedBody{
		payload: body,
	}
	return r
}
func (r *Request) WithMultipartFormDataBody(formData ...*FormData) *Request {
	r.body = &requestMultipartFormDataBody{
		formData: formData,
	}
	return r
}
func (r *Request) WithCustomBody(contentType string, body []byte) *Request {
	r.body = &requestCustomBody{
		payload:     body,
		contentType: contentType,
	}
	return r
}
func (r *Request) WithTimeout(timeout time.Duration) *Request {
	r.timeout = timeout
	return r
}
func (r *Request) WithHeader(header http.Header) *Request {
	r.header = header
	return r
}
func (r *Request) SetHeader(vv ...string) *Request {
	if len(vv)%2 != 0 {
		return r
	}
	for i := 0; i < len(vv); i += 2 {
		r.header.Set(vv[i], vv[i+1])
	}
	return r
}
func (r *Request) AddHeader(vv ...string) {
	if len(vv)%2 != 0 {
		return
	}
	for i := 0; i < len(vv); i += 2 {
		r.header.Add(vv[i], vv[i+1])
	}
}
func (r *Request) ReqBody() ([]byte, error) {
	if r.body == nil {
		return []byte{}, nil
	}
	body, err := r.body.Body()
	if err != nil {
		return nil, err
	}
	return body, nil
}