func newHTTPRequest(ops HTTPOptions) (*http.Request, error) {
	req, err := http.NewRequest(ops.Method, ops.Endpoint, bytes.NewBuffer(ops.Body))
	if err != nil {
		return nil, err
	}
	if len(ops.QueryParams) != 0 {
		addQueryParameters(req, ops.QueryParams)
	}
	return req, nil
}
newHTTPRequest to make a new http request
package server
import (
	"bytes"
	"io/ioutil"
	"net/http"
	"net/url"
	"time"
)
func addQueryParameters(req *http.Request, queryParams QueryParams) {
	params := url.Values{}
	for key, value := range queryParams {
		params.Add(key, value)
	}
	req.URL.RawQuery = params.Encode()
}