title: i am getting http reponse code 307 Temporary Redirect while trying to get access token from google access token endpoint with HTTP_Request2 Library
body: <p>I am getting HTTP response code 307 Temporary Redirect while trying to get access token from google access token endpoint with HTTP_Request2 Library</p>
  
  <pre><code>//$accessTokenExchangeUrl = "http://accounts.google.com/o/oauth2/token"; //here it is access token end point url
      $request = new HTTP_Request2($accessTokenExchangeUrl);
      $request-&gt;setMethod(HTTP_Request2::METHOD_POST)
      -&gt;addPostParameter(array('client_id' =&gt; '****40537585-7alm02hqa1j4sh3p9rfrldm7dqt1945h.apps.googleusercontent.com','client_secret' =&gt; '****dEwpzTN_OykbwwyLXeJF','grant_type' =&gt; 'authorization_code', 'code' =&gt; $code, 'redirect_uri' =&gt; $redirect)); //multiple
          try
          {
      $response =  $request-&gt;send();
        if (200 == $response-&gt;getStatus()) {
          echo "&lt;/br&gt;";
          echo "Request Send";
      }
      else
      {
          echo "&lt;/br&gt;";
          echo "Request Error";
           echo 'Unexpected HTTP status: ' . $response-&gt;getStatus() . ' ' .$response-&gt;getReasonPhrase();
      }   
      }
      catch (HTTP_Request2_Exception $e) {
      echo 'Error: ' . $e-&gt;getMessage();
  }
  </code></pre>