func (client *HTTPClient) Post(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error) {
	req, err := http.NewRequest("POST", endpoint, body)
	if err != nil {
		return nil, fmt.Errorf("unable to create a request: %w", err)
	}
	if conf != nil && conf.Context != nil {
		req = req.WithContext(conf.Context)
	}
	req.Header.Set("Accept", "application/json;odata=verbose")  
	req.Header.Set("Content-Type", "application/json;odata=verbose;charset=utf-8")
	if conf != nil && conf.Headers != nil {
		for key, value := range conf.Headers {
			req.Header.Set(key, value)
		}
	}
	resp, err := client.sp.Execute(req)
	if err != nil {
		return nil, fmt.Errorf("unable to request api: %w", err)
	}
	defer shut(resp.Body)
	return ioutil.ReadAll(resp.Body)
}
Post - generic POST request wrapper
package api
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"strings"
	"github.com/koltyakov/gosip"
)
type HTTPClient struct {
	sp *gosip.SPClient
}
type RequestConfig struct {
	Headers map[string]string
	Context context.Context
}
var HeadersPresets = struct {
	Verbose         *RequestConfig
	Minimalmetadata *RequestConfig
	Nometadata      *RequestConfig
}{
	Verbose: &RequestConfig{
		Headers: map[string]string{
			"Accept":          "application/json;odata=verbose",
			"Content-Type":    "application/json;odata=verbose;charset=utf-8",
			"Accept-Language": "en-US,en;q=0.9",
		},
	},
	Minimalmetadata: &RequestConfig{
		Headers: map[string]string{
			"Accept":          "application/json;odata=minimalmetadata",
			"Content-Type":    "application/json;odata=verbose;charset=utf-8",
			"Accept-Language": "en-US,en;q=0.9",
		},
	},
	Nometadata: &RequestConfig{
		Headers: map[string]string{
			"Accept":          "application/json;odata=nometadata",
			"Content-Type":    "application/json;odata=verbose;charset=utf-8",
			"Accept-Language": "en-US,en;q=0.9",
		},
	},
}
func NewHTTPClient(spClient *gosip.SPClient) *HTTPClient {
	return &HTTPClient{sp: spClient}
}
func (client *HTTPClient) Get(endpoint string, conf *RequestConfig) ([]byte, error) {
	req, err := http.NewRequest("GET", endpoint, nil)
	if err != nil {
		return nil, fmt.Errorf("unable to create a request: %w", err)
	}
	if conf != nil && conf.Context != nil {
		req = req.WithContext(conf.Context)
	}
	req.Header.Set("Accept", "application/json;odata=verbose")  
	if conf != nil && conf.Headers != nil {
		for key, value := range conf.Headers {
			req.Header.Set(key, value)
		}
	}
	resp, err := client.sp.Execute(req)
	if err != nil {
		return nil, fmt.Errorf("unable to request api: %w", err)
	}
	defer shut(resp.Body)
	return ioutil.ReadAll(resp.Body)
}