Source File
transport.go
Belonging Package
golang.org/x/oauth2
package oauth2
import (
)
func ( *Transport) ( *http.Request) (*http.Response, error) {
:= false
if .Body != nil {
defer func() {
if ! {
.Body.Close()
}
}()
}
if .Source == nil {
return nil, errors.New("oauth2: Transport's Source is nil")
}
, := .Source.Token()
if != nil {
return nil,
}
:= cloneRequest() // per RoundTripper contract
.SetAuthHeader()
func ( *Transport) ( *http.Request) {
cancelOnce.Do(func() {
log.Printf("deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts")
})
}
func ( *Transport) () http.RoundTripper {
if .Base != nil {
return .Base
}
return http.DefaultTransport
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |