diff --git a/contentful.go b/contentful.go index 02efd2c..d9377a5 100644 --- a/contentful.go +++ b/contentful.go @@ -143,6 +143,12 @@ func (c *Contentful) SetHTTPTransport(t http.RoundTripper) *Contentful { return c } +// SetBaseURL provides an option to change the BaseURL of the client +func (c *Contentful) SetBaseURL(url string) *Contentful { + c.BaseURL = url + return c +} + func (c *Contentful) newRequest(method, path string, query url.Values, body io.Reader) (*http.Request, error) { u, err := url.Parse(c.BaseURL) if err != nil {