title: Doing a post request on golang for uber authentication not working
body: <p>I'm getting a 400 Bad Request when doing a request do oauth on uber API. I was successful in doing redirection. But when trying to do oauth, it fails. Here's how I've set up my code. </p>
  
  <pre><code>type UberRequest struct {
      ClientSecret string `json:"client_secret"`
      ClientId     string `json:"client_id"`
      GrantType    string `json:"grant_type"`
      RedirectURI  string `json:"redirect_uri"`
      Code         string `json:"code"`
  }
  
  func HandlerUberAPI(w http.ResponseWriter, r *http.Request){
     c := appengine.NewContext(r)
     AuthorizationCode := r.URL.Query().Get("code")
  
     client := urlfetch.Client(c)
  
     uberRequestForm := &amp;UberRequest{
         ClientSecret: CLIENT_SECRET,
         ClientId:     CLIENT_ID,
         GrantType:    "authorization_code",
         RedirectURI:  URI_REDIRECT,
         Code:         CODE,
     }
  
     uberRequestFormJson, _ := json.Marshal(uberRequestForm)
     req, _ := http.NewRequest("POST", UberTokenHost, strings.NewReader(string(uberRequestFormJson)))
     req.Header.Set("Content-Type", "application/json")
  }
  </code></pre>
  
  <p>Also, if you're interested in looking at the golang code via playground - here it is <a href="https://play.golang.org/p/o8EtgudiMR" rel="nofollow">https://play.golang.org/p/o8EtgudiMR</a></p>
  
  <p>I know that my client secret and other information works as I've tested in on postman, I don't know why it fails on google app engine. </p>