transport - ActiveState ActiveGo 1.8
...

Package transport

import "google.golang.org/api/googleapi/transport"
Overview
Index

Overview ▾

Package transport contains HTTP transports used to make authenticated API requests.

type APIKey

APIKey is an HTTP Transport which wraps an underlying transport and appends an API Key "key" parameter to the URL of outgoing requests.

type APIKey struct {
    // Key is the API Key to set on requests.
    Key string

    // Transport is the underlying HTTP transport.
    // If nil, http.DefaultTransport is used.
    Transport http.RoundTripper
}

func (*APIKey) RoundTrip

func (t *APIKey) RoundTrip(req *http.Request) (*http.Response, error)