2012-02-17 70 views
9

我試圖使用Google Contacts API將Google通訊錄拉入Rails應用程序。我已經完成了Oauth2握手,現在正在使用我的訪問令牌請求受保護的資源。下面是代碼:按下Google Contacts API時出現「通過對等方重置連接」錯誤

uri = URI('https://www.google.com/m8/feeds/contacts/default/full') 
params = { :client_id => APP_CONFIG[:google_api_client_id], 
      :access_token => auth.access_token, 
      "max-results".to_sym => max_results 
     } 

uri.query = URI.encode_www_form(params) 
res = Net::HTTP.get_response(uri) 

回答

相關問題