Google Drive API watch 400 error Ruby on Rails

こ雲淡風輕ζ 提交于 2019-12-08 17:49:29

Okay, after struggling for so long, I figured out why it wasn't working. I forgot to do this:

JSON.generate(body_post)

So that my body was actually in application/json form.

Also, this line:

response = token.post(base + path,:opts => opts)

should be this:

response = token.post(base + path,opts)

simply because I'm not assigning the opts key, but the variable that I'm passing. Silly me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!