Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

client_appengine.go 530B

12345678910111213141516171819202122232425
  1. // Copyright 2014 The Go Authors. All rights reserved.
  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. // App Engine hooks.
  6. package oauth2
  7. import (
  8. "net/http"
  9. "golang.org/x/net/context"
  10. "golang.org/x/oauth2/internal"
  11. "google.golang.org/appengine/urlfetch"
  12. )
  13. func init() {
  14. internal.RegisterContextClientFunc(contextClientAppEngine)
  15. }
  16. func contextClientAppEngine(ctx context.Context) (*http.Client, error) {
  17. return urlfetch.Client(ctx), nil
  18. }