Make Authenticate issue an HTTP request
diff --git a/context.go b/context.go
index 0a73890..a35242c 100644
--- a/context.go
+++ b/context.go
@@ -1,11 +1,24 @@
package gophercloud
+import (
+ "net/http"
+)
+
type Context struct {
+ // providerMap serves as a directory of supported providers.
providerMap map[string]*Provider
+
+ // httpClient refers to the current HTTP client interface to use.
+ httpClient *http.Client
}
func TestContext() *Context {
return &Context{
providerMap: make(map[string]*Provider),
+ httpClient: &http.Client{},
}
}
+
+func (c *Context) UseCustomClient(hc *http.Client) {
+ c.httpClient = hc;
+}