Skip to content
  • Phil Richards's avatar
    Added `ContextAwareHttpClient`. · fa6e2dd2
    Phil Richards authored
    `ContextAwareHttpClient` checks whether the http request's Context has
    completed/cancelled when the wrapped HttpDoer has completed. If it has,
    it returns the Context's err (as opposed to the `error` from
    `HttpDoer.Do`), since it's more likely to be useful.
    
    The `HttpDoer` iface was moved to a new `net` package, which is also
    where `ContextAwareHttpClient` lives.
    
    The `HttpTokenRetriever` was also updated to use an `HttpDoer` instead
    of `FormPoster`. The now-defunct `FormPoster` was removed.
    
    Tests and mocks included.
    
    Fixes #35.
    fa6e2dd2