Cache read operation should be handled during construction.

This commit is contained in:
Burcu Dogan
2014-05-26 11:53:51 +02:00
parent 6bb3577bf0
commit 909f098dcd
3 changed files with 91 additions and 30 deletions

View File

@@ -98,7 +98,7 @@ func (t *authorizedTransport) RoundTrip(req *http.Request) (resp *http.Response,
// Try to initialize the token from the cache.
if token == nil {
if c := t.fetcher.Cache(); c != nil {
token = c.Read()
token = c.Token()
}
}