func NewBytesResponse(status int, body []byte) *http.Response {
	return &http.Response{
		Status:        strconv.Itoa(status),
		StatusCode:    status,
		Body:          NewRespBodyFromBytes(body),
		Header:        http.Header{},
		ContentLength: -1,
	}
}
NewBytesResponse creates an *http.Response with a body based on the given bytes.  Also accepts
an http status code.
package httpmock
import (
	"bytes"
	"encoding/json"
	"encoding/xml"
	"fmt"
	"io"
	"net/http"
	"strconv"
	"strings"
)
type Responder func(*http.Request) (*http.Response, error)
func (r Responder) times(name string, n int, fn ...func(...interface{})) Responder {
	count := 0
	return func(req *http.Request) (*http.Response, error) {
		count++
		if count > n {
			err := stackTracer{
				err: fmt.Errorf("Responder not found for %s %s (coz %s and already called %d times)", req.Method, req.URL, name, count),
			}
			if len(fn) > 0 {
				err.customFn = fn[0]
			}
			return nil, err
		}
		return r(req)
	}
}
func (r Responder) Times(n int, fn ...func(...interface{})) Responder {
	return r.times("Times", n, fn...)
}
func (r Responder) Once(fn ...func(...interface{})) Responder {
	return r.times("Once", 1, fn...)
}
func (r Responder) Trace(fn func(...interface{})) Responder {
	return func(req *http.Request) (*http.Response, error) {
		resp, err := r(req)
		return resp, stackTracer{
			customFn: fn,
			err:      err,
		}
	}
}
func ResponderFromResponse(resp *http.Response) Responder {
	return func(req *http.Request) (*http.Response, error) {
		res := new(http.Response)
		*res = *resp
		res.Request = req
		return res, nil
	}
}
func NewErrorResponder(err error) Responder {
	return func(req *http.Request) (*http.Response, error) {
		return nil, err
	}
}
func NewNotFoundResponder(fn func(...interface{})) Responder {
	return func(req *http.Request) (*http.Response, error) {
		return nil, stackTracer{
			customFn: fn,
			err:      fmt.Errorf("Responder not found for %s %s", req.Method, req.URL),
		}
	}
}
func NewStringResponse(status int, body string) *http.Response {
	return &http.Response{
		Status:        strconv.Itoa(status),
		StatusCode:    status,
		Body:          NewRespBodyFromString(body),
		Header:        http.Header{},
		ContentLength: -1,
	}
}
func NewStringResponder(status int, body string) Responder {
	return ResponderFromResponse(NewStringResponse(status, body))
}