dial_appengine.go 379 B

1234567891011121314151617181920
  1. // Copyright 2016 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build appengine
  5. package http
  6. import (
  7. "context"
  8. "net/http"
  9. "google.golang.org/appengine/urlfetch"
  10. )
  11. func init() {
  12. appengineUrlfetchHook = func(ctx context.Context) http.RoundTripper {
  13. return &urlfetch.Transport{Context: ctx}
  14. }
  15. }