dial_appengine.go 400 B

123456789101112131415161718192021
  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. //go:build appengine
  5. // +build appengine
  6. package http
  7. import (
  8. "context"
  9. "net/http"
  10. "google.golang.org/appengine/urlfetch"
  11. )
  12. func init() {
  13. appengineUrlfetchHook = func(ctx context.Context) http.RoundTripper {
  14. return &urlfetch.Transport{Context: ctx}
  15. }
  16. }