Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the appengine/urlfetch package with goauth2?

The goauth2 package has an example use. But on app engine, the normal http.Client isn't available. How do I use the app engine urlfetch package with goauth2?

like image 930
mjibson Avatar asked Mar 16 '13 05:03

mjibson


1 Answers

You must add a Transport parameter to the first line of the callback:

t := &oauth.Transport{
    Config:    oauth_conf,
    Transport: &urlfetch.Transport{Context: c},
}
like image 131
mjibson Avatar answered Sep 18 '22 17:09

mjibson