func BuildResponse(res *http.Response) (*Response, error) {
	body, err := ioutil.ReadAll(res.Body)
	response := Response{
		StatusCode: res.StatusCode,
		Body:       string(body),
		Headers:    res.Header,
	}
	res.Body.Close()  
	return &response, err
}
BuildResponse builds the response struct.
package rest
import (
	"bytes"
	"context"
	"io/ioutil"
	"net/http"
	"net/url"
)
const Version = "2.6.5"
type Method string
const (
	Get    Method = "GET"
	Post   Method = "POST"
	Put    Method = "PUT"
	Patch  Method = "PATCH"
	Delete Method = "DELETE"
)
type Request struct {
	Method      Method
	BaseURL     string  
	Headers     map[string]string
	QueryParams map[string]string
	Body        []byte
}
type RestError struct {
	Response *Response
}
func (e *RestError) Error() string {
	return e.Response.Body
}
var DefaultClient = &Client{HTTPClient: &http.Client{}}
type Client struct {
	HTTPClient *http.Client
}
type Response struct {
	StatusCode int                  
	Body       string               
	Headers    map[string][]string  
}
func AddQueryParameters(baseURL string, queryParams map[string]string) string {
	baseURL += "?"
	params := url.Values{}
	for key, value := range queryParams {
		params.Add(key, value)
	}
	return baseURL + params.Encode()
}
func BuildRequestObject(request Request) (*http.Request, error) {
	if len(request.QueryParams) != 0 {
		request.BaseURL = AddQueryParameters(request.BaseURL, request.QueryParams)
	}
	req, err := http.NewRequest(string(request.Method), request.BaseURL, bytes.NewBuffer(request.Body))
	if err != nil {
		return req, err
	}
	for key, value := range request.Headers {
		req.Header.Set(key, value)
	}
	_, exists := req.Header["Content-Type"]
	if len(request.Body) > 0 && !exists {
		req.Header.Set("Content-Type", "application/json")
	}
	return req, err
}
func MakeRequest(req *http.Request) (*http.Response, error) {
	return DefaultClient.HTTPClient.Do(req)
}