func (r *Request) Compression(scheme string) *Request {
	r.Header.Set("Content-Encoding", scheme)
	r.CompressionScheme = scheme
	return r
}
Compression defines the request compression scheme, and enables automatic body decompression.
Supports only the "gzip" scheme so far.
package gock
import (
	"encoding/base64"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"strings"
)
type MapRequestFunc func(*http.Request) *http.Request
type FilterRequestFunc func(*http.Request) bool
type Request struct {
	Mock Mock
	Response *Response
	Error error
	Counter int
	Persisted bool
	Options Options
	URLStruct *url.URL
	Method string
	CompressionScheme string
	Header http.Header
	Cookies []*http.Cookie
	PathParams map[string]string
	BodyBuffer []byte
	Mappers []MapRequestFunc
	Filters []FilterRequestFunc
}
func NewRequest() *Request {
	return &Request{
		Counter:    1,
		URLStruct:  &url.URL{},
		Header:     make(http.Header),
		PathParams: make(map[string]string),
	}
}
func (r *Request) URL(uri string) *Request {
	r.URLStruct, r.Error = url.Parse(uri)
	return r
}
func (r *Request) SetURL(u *url.URL) *Request {
	r.URLStruct = u
	return r
}
func (r *Request) Path(path string) *Request {
	r.URLStruct.Path = path
	return r
}
func (r *Request) Get(path string) *Request {
	return r.method("GET", path)
}
func (r *Request) Post(path string) *Request {
	return r.method("POST", path)
}
func (r *Request) Put(path string) *Request {
	return r.method("PUT", path)
}
func (r *Request) Delete(path string) *Request {
	return r.method("DELETE", path)
}
func (r *Request) Patch(path string) *Request {
	return r.method("PATCH", path)
}
func (r *Request) Head(path string) *Request {
	return r.method("HEAD", path)
}
func (r *Request) method(method, path string) *Request {
	if path != "/" {
		r.URLStruct.Path = path
	}
	r.Method = strings.ToUpper(method)
	return r
}
func (r *Request) Body(body io.Reader) *Request {
	r.BodyBuffer, r.Error = ioutil.ReadAll(body)
	return r
}
func (r *Request) BodyString(body string) *Request {
	r.BodyBuffer = []byte(body)
	return r
}
func (r *Request) File(path string) *Request {
	r.BodyBuffer, r.Error = ioutil.ReadFile(path)
	return r
}