func (c *Client) GetFullURL(endpoint string) string {
	return c.Protocol + path.Join(c.BaseURL, c.Version, endpoint)
}
GetFullURL builds the endpoint url from the client configuration combining it with the supplied endpoint
package nordeago
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"path"
)
type Client struct {
	BaseURL      string
	Protocol     string
	Version      string
	ClientID     string  
	ClientSecret string  
	TppToken     string
	RedirectURL  string
	AuthCode     string
	AccessToken  string
}
func InitClient(clientID string, clientSecret string, redirectURL string) Client {
	c := Client{}
	c.Protocol = "https://"
	c.BaseURL = "api.nordeaopenbanking.com"
	c.Version = "v2"
	c.ClientID = clientID
	c.ClientSecret = clientSecret
	c.RedirectURL = redirectURL
	return c
}
func (c *Client) request(requestType string, endpoint string, body io.Reader, headers map[string]string) (*http.Response, error) {
	req, err := http.NewRequest(requestType, c.GetFullURL(endpoint), body)
	if err != nil {
		return nil, err
	}
	for key, value := range headers {
		req.Header.Set(key, value)
	}
	httpClient := &http.Client{}
	return httpClient.Do(req)
}
func (c *Client) Post(endpoint string, requestObject interface{}, headers map[string]string) (*http.Response, error) {
	requestByte, err := json.Marshal(requestObject)
	if err != nil {
		return nil, err
	}
	headers = initHeaders(headers)
	headers["Accept"] = "application/json"
	requestReader := bytes.NewReader(requestByte)
	return c.request("POST", endpoint, requestReader, headers)
}
func (c *Client) PostWithAccessToken(endpoint string, requestObject interface{}, headers map[string]string) (*http.Response, error) {
	requestByte, err := json.Marshal(requestObject)
	if err != nil {
		return nil, err
	}
	headers = c.setAccessTokenHeaders(headers)
	headers["Accept"] = "application/json"
	requestReader := bytes.NewReader(requestByte)
	return c.request("POST", endpoint, requestReader, headers)
}
func (c *Client) Get(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = initHeaders(headers)
	headers["Accept"] = "application/json"
	return c.request("GET", endpoint, nil, headers)
}
func (c *Client) GetWithAccessToken(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = c.setAccessTokenHeaders(headers)
	return c.request("GET", endpoint, nil, headers)
}
func (c *Client) Put(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = initHeaders(headers)
	return c.request("PUT", endpoint, nil, headers)
}
func (c *Client) PutWithAccessToken(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = c.setAccessTokenHeaders(headers)
	return c.request("PUT", endpoint, nil, headers)
}
func (c *Client) Delete(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = initHeaders(headers)
	headers["Accept"] = "application/json"
	return c.request("DELETE", endpoint, nil, headers)
}
func (c *Client) DeleteWithAccessToken(endpoint string, headers map[string]string) (*http.Response, error) {
	headers = c.setAccessTokenHeaders(headers)
	headers["Accept"] = "application/json"
	return c.request("DELETE", endpoint, nil, headers)
}