func RequestFromFile(filepath string) (*http.Request, error) {
	file, err := ioutil.ReadFile(filepath)
	if err != nil {
		return nil, err
	}
	file = append(file, []byte("\r\n\r\n")...)
	rr, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(file)))
	if err != nil {
		return nil, err
	}
	req, err := http.NewRequest(rr.Method, "http://"+rr.Host+rr.RequestURI, rr.Body)
	if err != nil {
		return nil, err
	}
	for k := range rr.Header {
		req.Header.Set(k, rr.Header.Get(k))
	}
	return req, err
}
RequestFromFile loads request data from file and creates a new http.Request
request file should be in HTTP/1.x wire representation format
package httpclient
import (
	"bufio"
	"bytes"
	"io"
	"io/ioutil"
	"net/http"
)