func CleanUnmatchedRequest() {
	mutex.Lock()
	defer mutex.Unlock()
	unmatchedRequests = []*http.Request{}
}
CleanUnmatchedRequest cleans the unmatched requests internal registry.
package gock
import (
	"fmt"
	"net/http"
	"net/http/httputil"
	"net/url"
	"regexp"
	"sync"
)
var mutex = &sync.Mutex{}
var config = struct {
	Networking        bool
	NetworkingFilters []FilterRequestFunc
	Observer          ObserverFunc
}{}
type ObserverFunc func(*http.Request, Mock)
var DumpRequest ObserverFunc = func(request *http.Request, mock Mock) {
	bytes, _ := httputil.DumpRequestOut(request, true)
	fmt.Println(string(bytes))
	fmt.Printf("\nMatches: %v\n---\n", mock != nil)
}
var unmatchedRequests = []*http.Request{}
func New(uri string) *Request {
	Intercept()
	res := NewResponse()
	req := NewRequest()
	req.URLStruct, res.Error = url.Parse(normalizeURI(uri))
	exp := NewMock(req, res)
	Register(exp)
	return req
}
func Intercepting() bool {
	mutex.Lock()
	defer mutex.Unlock()
	return http.DefaultTransport == DefaultTransport
}
func Intercept() {
	if !Intercepting() {
		mutex.Lock()
		http.DefaultTransport = DefaultTransport
		mutex.Unlock()
	}
}
func InterceptClient(cli *http.Client) {
	_, ok := cli.Transport.(*Transport)
	if ok {
		return  
	}
	trans := NewTransport()
	trans.Transport = cli.Transport
	cli.Transport = trans
}
func RestoreClient(cli *http.Client) {
	trans, ok := cli.Transport.(*Transport)
	if !ok {
		return
	}
	cli.Transport = trans.Transport
}
func Disable() {
	mutex.Lock()
	defer mutex.Unlock()
	http.DefaultTransport = NativeTransport
}
func Off() {
	Flush()
	Disable()
}
func OffAll() {
	Flush()
	Disable()
	CleanUnmatchedRequest()
}
func Observe(fn ObserverFunc) {
	mutex.Lock()
	defer mutex.Unlock()
	config.Observer = fn
}
func EnableNetworking() {
	mutex.Lock()
	defer mutex.Unlock()
	config.Networking = true
}
func DisableNetworking() {
	mutex.Lock()
	defer mutex.Unlock()
	config.Networking = false
}
func NetworkingFilter(fn FilterRequestFunc) {
	mutex.Lock()
	defer mutex.Unlock()
	config.NetworkingFilters = append(config.NetworkingFilters, fn)
}
func DisableNetworkingFilters() {
	mutex.Lock()
	defer mutex.Unlock()
	config.NetworkingFilters = []FilterRequestFunc{}
}
func GetUnmatchedRequests() []*http.Request {
	mutex.Lock()
	defer mutex.Unlock()
	return unmatchedRequests
}
func HasUnmatchedRequest() bool {
	return len(GetUnmatchedRequests()) > 0
}