【发布时间】:2016-04-18 19:43:35
【问题描述】:
我正在尝试在提交表单时检索用户的 Google 帐户信息。为此,我必须向 url 发出 GET 请求。这是 YouTube API 文档中的内容
To request the currently logged-in user's profile, send a GET request
to the following URL. Note: For this request, you must provide an
authentication token, which enables YouTube to identify the user.
https://gdata.youtube.com/feeds/api/users/default
https://developers.google.com/youtube/2.0/developers_guide_protocol_profiles?hl=en
如何使它在提交表单时发生自定义(或具体而言)GET 请求,以及如何提供身份验证令牌?可能有帮助的信息:提交表单时,它将转到 VideoController 的新方法。
另外,在提出请求后,我如何访问信息?我需要查看给定信息中是否存在<yt:relationship>。
谢谢!
【问题讨论】:
-
你如何向 google 发出 GET 请求?
-
是的,这是我的问题。
-
你没有提供你的代码来分析
-
这不是一个真正的代码特定问题,因为它是如何发出 GET 请求的。
-
直接获取/发布调用,例如
excongem
标签: ruby-on-rails get crud google-signin